Skip to content

Commit

Permalink
IOError merged into OSError as of Python 3.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsteves committed Jan 13, 2023
1 parent 01f183f commit 06ee582
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/panxapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def get_element(s):
elif os.path.isfile(s):
try:
f = open(s)
except IOError as msg:
except OSError as msg:
print('open %s: %s' % (s, msg), file=sys.stderr)
sys.exit(1)
element = f.readlines()
Expand Down Expand Up @@ -788,13 +788,13 @@ def save_attachment(xapi, options):

try:
f = open(path, 'wb')
except IOError as msg:
except OSError as msg:
print('open %s: %s' % (path, msg), file=sys.stderr)
return

try:
f.write(xapi.export_result['content'])
except IOError as msg:
except OSError as msg:
print('write %s: %s' % (path, msg), file=sys.stderr)
f.close()
return
Expand Down

0 comments on commit 06ee582

Please sign in to comment.