Do not use base except: clauses

https://docs.python.org/2/howto/doanddont.html#except

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2017-11-10 05:18:32 -05:00
parent ade9d61c22
commit 3c1655322d
9 changed files with 46 additions and 37 deletions
+2 -2
View File
@@ -63,9 +63,9 @@ if __name__ == '__main__':
(opts, args) = parser.parse_args()
try:
if len(args) != 1: raise
if len(args) != 1: raise ValueError
opts.listen_port = int(args[0])
except:
except ValueError:
parser.error("Invalid arguments")
logging.basicConfig(level=logging.INFO)