Skip to content

Commit 126fd92

Browse files
committed
don't bother with traceback for HTTP errors (SOFTWARE-4751)
1 parent e48f500 commit 126fd92

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

osg-comanage-project-usermap.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import json
66
import getopt
77
import collections
8+
import urllib.error
89
import urllib.request
910

1011

@@ -218,5 +219,9 @@ def main(args):
218219

219220

220221
if __name__ == "__main__":
221-
main(sys.argv[1:])
222+
try:
223+
main(sys.argv[1:])
224+
except urllib.error.HTTPError as e:
225+
print(e, file=sys.stderr)
226+
sys.exit(1)
222227

0 commit comments

Comments
 (0)