import os
import sys
import socket
+import errno
def _string_bytearray(s):
# gets us bytes in py2 and py3
# in my browser). Also the error is very nonspecific :-/.
# This seems to happen on jessie, and is fixed in stretch.
# Anyway:
- return parse_eval(expr_pat % '(*((int (*)(void))__errno_location)())')
+ return parse_eval(expr_pat % '(*((int*(*)(void))__errno_location)())')
# calling functions (need to cast the function name to the right
# type in case maybe gdb doesn't know the type)
)
if r < 0:
errnoval = di._parse_eval_errno('%s')
- if errnoval != os.errno.EEXIST:
+ if errnoval != errno.EEXIST:
raise RuntimeError("mkdir %s failed: `%s'" %
(repr(path), os.strerror(errnoval)))
return 0