1
0
Fork 0
mirror of https://github.com/clockfort/GitHub-Backup.git synced 2025-03-16 00:00:06 +01:00

Merge pull request #23 from Enrico204/master

Fixed crash when no e-mail is available from GitHub repos API
This commit is contained in:
Chris Lockfort 2016-07-20 19:49:35 -07:00 committed by GitHub
commit 96553fa6e9

View file

@ -106,7 +106,8 @@ def update_repo(repo, dir, args):
# Fetch description and owner (useful for gitweb, cgit etc.) # Fetch description and owner (useful for gitweb, cgit etc.)
# TODO: can we combine that in a single call to 'git config' # TODO: can we combine that in a single call to 'git config'
os.system("git config --local gitweb.description %s"%(shell_escape(repo.description),)) os.system("git config --local gitweb.description %s"%(shell_escape(repo.description),))
os.system("git config --local gitweb.owner %s"%(shell_escape("%s <%s>"%(repo.user.name, repo.user.email.encode("utf-8"))),)) if repo.user.name is not None and repo.user.email is not None:
os.system("git config --local gitweb.owner %s"%(shell_escape("%s <%s>"%(repo.user.name, repo.user.email.encode("utf-8"))),))
os.system("git config --local cgit.name %s"%(shell_escape(repo.name),)) os.system("git config --local cgit.name %s"%(shell_escape(repo.name),))
os.system("git config --local cgit.defbranch %s"%(shell_escape(repo.default_branch),)) os.system("git config --local cgit.defbranch %s"%(shell_escape(repo.default_branch),))