fix CDLL failure on windows
This commit is contained in:
parent
a30b07dd36
commit
9baea936f2
@ -19,7 +19,9 @@
|
||||
# python links against libc, so we can treat this as a libc handle
|
||||
# we could also use CDLL("libc.so.6") but this is (irrelevantly) more future proof
|
||||
libc = ctypes.CDLL(None)
|
||||
except OSError:
|
||||
except (OSError, TypeError):
|
||||
# OSError if the call fails,
|
||||
# TypeError on Windows
|
||||
pass
|
||||
|
||||
renameat2 = getattr(libc, "renameat2", None)
|
||||
|
Loading…
Reference in New Issue
Block a user