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:
commit
96553fa6e9
1 changed files with 2 additions and 1 deletions
|
@ -106,7 +106,8 @@ def update_repo(repo, dir, args):
|
|||
# Fetch description and owner (useful for gitweb, cgit etc.)
|
||||
# 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.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.defbranch %s"%(shell_escape(repo.default_branch),))
|
||||
|
|
Loading…
Add table
Reference in a new issue