From: Oleg Broytman Date: Thu, 23 Jan 2014 21:02:14 +0000 (+0400) Subject: Minor refactoring X-Git-Tag: v2.3.2~29 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=68e059f66ec0d4db1ad741bc21e6b10c5db51436;p=mimedecode.git Minor refactoring --- 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')