mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 01:52:56 +01:00
Add misc.py
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
4c076691a6
commit
f6e5d25df7
1 changed files with 8 additions and 0 deletions
8
tools/python/jwutils/misc.py
Normal file
8
tools/python/jwutils/misc.py
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
import os, errno
|
||||||
|
|
||||||
|
def silentremove(filename): #export
|
||||||
|
try:
|
||||||
|
os.remove(filename)
|
||||||
|
except OSError as e:
|
||||||
|
if e.errno != errno.ENOENT:
|
||||||
|
raise # re-raise exception if a different error occurred
|
||||||
Loading…
Add table
Add a link
Reference in a new issue