From 9746944e4cb994fee5edfcf696e1486abc8adef1 Mon Sep 17 00:00:00 2001 From: Chris Angelico Date: Wed, 5 Nov 2014 22:08:59 +1100 Subject: [PATCH] Use "not x" rather than "x == None" for testing the result of raw_input() --- gitfiti.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gitfiti.py b/gitfiti.py index 14e4c502a..6dba15365 100755 --- a/gitfiti.py +++ b/gitfiti.py @@ -267,7 +267,7 @@ def main(): ghe = raw_input("Enter nothing for https://github.com/ to be used: ") print ('Enter your github username:') username = raw_input(">") - if ghe is None or ghe == "": + if not ghe: git_base = "https://github.com/" cal = get_calendar(username) else: @@ -307,14 +307,14 @@ def main(): print ('enter the image name to gitfiti') print ('images: ' + ", ".join(images.keys())) image = raw_input(">") - if image == None: + if not image: image = IMAGES['kitty'] else: try: image = images[image] except: image = IMAGES['kitty'] - if ghe is None or ghe == "": + if not ghe: output = fake_it(image, get_start_date(), username, repo, offset, m*match) else: