Skip to content

Commit

Permalink
Python 2 uses IOError for some file-related issues
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Feb 23, 2021
1 parent 1a38b3c commit 18ca3ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/build/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def rewrite(filename, contents, verbose=True):
if (stl[0] == '-' or stl[0] == '+') \
and stl[1] != '-' and stl[1] != '+':
print(" " + stl)
except OSError:
except (IOError, OSError):
pass
# print "Missing", filename
dirpath = os.path.split(filename)[0]
Expand Down Expand Up @@ -184,7 +184,7 @@ def __init__(self, template_file=None):
def rmdir(path):
try:
shutil.rmtree(path)
except OSError:
except (IOError, OSError):
pass


Expand Down

0 comments on commit 18ca3ba

Please sign in to comment.