##// END OF EJS Templates
util: add tryunlink function...
Ryan McElroy -
r31540:6d5b77ab default
parent child Browse files
Show More
@@ -1617,6 +1617,14 b' def unlinkpath(f, ignoremissing=False):'
1617 except OSError:
1617 except OSError:
1618 pass
1618 pass
1619
1619
1620 def tryunlink(f):
1621 """Attempt to remove a file, ignoring ENOENT errors."""
1622 try:
1623 unlink(f)
1624 except OSError as e:
1625 if e.errno != errno.ENOENT:
1626 raise
1627
1620 def makedirs(name, mode=None, notindexed=False):
1628 def makedirs(name, mode=None, notindexed=False):
1621 """recursive directory creation with parent mode inheritance
1629 """recursive directory creation with parent mode inheritance
1622
1630
General Comments 0
You need to be logged in to leave comments. Login now