Преглед изворни кода

at xattr module import time, loggers are not initialized yet

Thomas Waldmann пре 8 година
родитељ
комит
3237db4621
1 измењених фајлова са 1 додато и 4 уклоњено
  1. 1 4
      borg/xattr.py

+ 1 - 4
borg/xattr.py

@@ -12,9 +12,6 @@ from distutils.version import LooseVersion
 
 
 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 @@ if libc_name is None:
         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