From f665e57d4a49dc031d5ebd19b6e09f8424b23735 Mon Sep 17 00:00:00 2001 From: Alun Davey Date: Tue, 19 May 2015 16:34:36 +0100 Subject: [PATCH] Fixes 'NoneType' object has no attribute 'replace' --- github-backup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/github-backup.py b/github-backup.py index f44b7ec..50d1a18 100755 --- a/github-backup.py +++ b/github-backup.py @@ -115,7 +115,8 @@ def update_repo(repo, dir, args): os.chdir(savedPath) def shell_escape(str): - return "'" + unicode(str.replace("'", "\\'")).encode("utf-8") + "'" + if str: + return "'" + unicode(str.replace("'", "\\'")).encode("utf-8") + "'" if __name__ == "__main__": main()