1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-24 08:45:13 +00:00

at xattr module import time, loggers are not initialized yet

This commit is contained in:
Thomas Waldmann 2016-11-12 23:10:40 +01:00
parent 5c98b850dc
commit 3237db4621

View file

@ -12,9 +12,6 @@
from .helpers import Buffer from .helpers import Buffer
from .logger import create_logger
logger = create_logger()
try: try:
ENOATTR = errno.ENOATTR ENOATTR = errno.ENOATTR
@ -68,7 +65,7 @@ def get_all(path, follow_symlinks=True):
libc_name = 'libc.dylib' libc_name = 'libc.dylib'
else: else:
msg = "Can't find C library. No fallback known. Try installing ldconfig, gcc/cc or objdump." msg = "Can't find C library. No fallback known. Try installing ldconfig, gcc/cc or objdump."
logger.error(msg) print(msg, file=sys.stderr) # logger isn't initialized at this stage
raise Exception(msg) raise Exception(msg)
# If we are running with fakeroot on Linux, then use the xattr functions of fakeroot. This is needed by # If we are running with fakeroot on Linux, then use the xattr functions of fakeroot. This is needed by