Permalink
Browse files

Merge pull request #1 from jbarratt/master

Check for 'None' in argparse password
  • Loading branch information...
2 parents d69f3b1 + 0e4a3ac commit d1bba63971f14140ac8cb05e28e0ced3652929de @jackpal committed Feb 5, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 main.py
View
@@ -375,7 +375,7 @@ def upload(gd_client, localPath, album, fileName):
print "retrying in " + str(delay) + " seconds"
time.sleep(delay)
delay = delay * 2
-
+
# delete the temp file that was created if we shrank an image:
if imagePath != localPath:
os.remove(imagePath)
@@ -384,7 +384,7 @@ def main():
args = parseArgs()
email = args.email
password = None
- if 'password' in args:
+ if 'password' in args and args.password is not None:
password = args.password
else:
password = getpass.getpass("Enter password for " + email + ": ")
@@ -396,4 +396,4 @@ def main():
syncDirs(gd_client, albumDiff['both'], localAlbums, webAlbums)
uploadDirs(gd_client, albumDiff['localOnly'], localAlbums)
-main()
+main()

0 comments on commit d1bba63

Please sign in to comment.