Skip to content

Commit 06ee582

Browse files
committed
IOError merged into OSError as of Python 3.3.
1 parent 01f183f commit 06ee582

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/panxapi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ def get_element(s):
676676
elif os.path.isfile(s):
677677
try:
678678
f = open(s)
679-
except IOError as msg:
679+
except OSError as msg:
680680
print('open %s: %s' % (s, msg), file=sys.stderr)
681681
sys.exit(1)
682682
element = f.readlines()
@@ -788,13 +788,13 @@ def save_attachment(xapi, options):
788788

789789
try:
790790
f = open(path, 'wb')
791-
except IOError as msg:
791+
except OSError as msg:
792792
print('open %s: %s' % (path, msg), file=sys.stderr)
793793
return
794794

795795
try:
796796
f.write(xapi.export_result['content'])
797-
except IOError as msg:
797+
except OSError as msg:
798798
print('write %s: %s' % (path, msg), file=sys.stderr)
799799
f.close()
800800
return

0 commit comments

Comments
 (0)