]> git.phdru.name Git - mimedecode.git/commitdiff
Minor refactoring
authorOleg Broytman <phd@phdru.name>
Thu, 23 Jan 2014 21:02:14 +0000 (01:02 +0400)
committerOleg Broytman <phd@phdru.name>
Thu, 23 Jan 2014 21:02:14 +0000 (01:02 +0400)
mimedecode.py

index 21ab3717a6a96386213d55462bd245d6c3d3d552..5d84a27621954b82724b385282e5bb1f9b358cf6 100755 (executable)
@@ -350,11 +350,9 @@ if __name__ == "__main__":
     arguments = init()
 
     la = len(arguments)
-    if la == 0:
-        infile = sys.stdin
-    elif la <> 1:
+    if la >= 2:
         usage(1)
-    elif arguments[0] == '-':
+    if (la == 0) or (arguments[0] == '-'):
         infile = sys.stdin
     else:
         infile = open(arguments[0], 'r')