X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=mimedecode.py;h=5d84a27621954b82724b385282e5bb1f9b358cf6;hb=68e059f66ec0d4db1ad741bc21e6b10c5db51436;hp=21ab3717a6a96386213d55462bd245d6c3d3d552;hpb=5419f42c6f82c81eddac47956910eb1ecc3c639e;p=mimedecode.git diff --git a/mimedecode.py b/mimedecode.py index 21ab371..5d84a27 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -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')