From 68e059f66ec0d4db1ad741bc21e6b10c5db51436 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 24 Jan 2014 01:02:14 +0400 Subject: [PATCH] Minor refactoring --- mimedecode.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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') -- 2.39.2