Use Python 3 compatible syntax for exceptions py3-fix
authorYegor Yefremov <yegorslists@googlemail.com>
Fri, 07 Sep 2018 09:24:52 +0200
branchpy3-fix
changeset 2303 03ea6837a0b4
parent 2302 69fefac5760e
child 2304 68e6649039a5
child 2564 186f0137b0ca
Use Python 3 compatible syntax for exceptions
Beremiz_service.py
--- a/Beremiz_service.py	Wed Aug 29 18:58:51 2018 +0300
+++ b/Beremiz_service.py	Fri Sep 07 09:24:52 2018 +0200
@@ -69,7 +69,7 @@
 
 try:
     opts, argv = getopt.getopt(sys.argv[1:], "i:p:n:x:t:a:w:c:e:s:h", ["help", "version"])
-except getopt.GetoptError, err:
+except getopt.GetoptError as err:
     # print help information and exit:
     print(str(err))  # will print something like "option -a not recognized"
     usage()