Merge pull request #19 from Rosuav/input_comparison_style

Use "not x" rather than "x == None" for testing the result of raw_input()
This commit is contained in:
Eric Romano
2014-11-08 16:29:31 -05:00

View File

@ -267,7 +267,7 @@ def main():
ghe = raw_input("Enter nothing for https://github.com/ to be used: ") ghe = raw_input("Enter nothing for https://github.com/ to be used: ")
print ('Enter your github username:') print ('Enter your github username:')
username = raw_input(">") username = raw_input(">")
if ghe is None or ghe == "": if not ghe:
git_base = "https://github.com/" git_base = "https://github.com/"
cal = get_calendar(username) cal = get_calendar(username)
else: else:
@ -307,14 +307,14 @@ def main():
print ('enter the image name to gitfiti') print ('enter the image name to gitfiti')
print ('images: ' + ", ".join(images.keys())) print ('images: ' + ", ".join(images.keys()))
image = raw_input(">") image = raw_input(">")
if image == None: if not image:
image = IMAGES['kitty'] image = IMAGES['kitty']
else: else:
try: try:
image = images[image] image = images[image]
except: except:
image = IMAGES['kitty'] image = IMAGES['kitty']
if ghe is None or ghe == "": if not ghe:
output = fake_it(image, get_start_date(), username, repo, offset, output = fake_it(image, get_start_date(), username, repo, offset,
m*match) m*match)
else: else: