summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/keymanager/wrapper.py
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2017-04-25 18:00:12 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2017-04-27 19:33:28 +0200
commit9f95446a55533c8cdceec7c4430be5cad752ecb1 (patch)
tree4265c127ee9b2c5f1e038836ad2e7b92ea0cad80 /src/leap/bitmask/keymanager/wrapper.py
parent9a1548aa01996ce93febe0272f1f8e4dd5e130ff (diff)
[bug] unify logging style using class attr
I changed most of the logger statements to use a class attribute, in this way it's easier to identify which class it's logging them. in some cases I leave a module-level logger, when we're either using functions or when the module it's too small. at the same time I did a general review and cleanup of the logging statements.
Diffstat (limited to 'src/leap/bitmask/keymanager/wrapper.py')
-rw-r--r--src/leap/bitmask/keymanager/wrapper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leap/bitmask/keymanager/wrapper.py b/src/leap/bitmask/keymanager/wrapper.py
index ef8e6640..eb5074f3 100644
--- a/src/leap/bitmask/keymanager/wrapper.py
+++ b/src/leap/bitmask/keymanager/wrapper.py
@@ -35,7 +35,6 @@ except ImportError:
GNUPG_NG = False
-logger = Logger()
class TempGPGWrapper(object):
@@ -43,6 +42,7 @@ class TempGPGWrapper(object):
A context manager that wraps a temporary GPG keyring which only contains
the keys given at object creation.
"""
+ log = Logger()
def __init__(self, keys=None, gpgbinary=None):
"""
@@ -160,6 +160,6 @@ class TempGPGWrapper(object):
homedir = os.path.normpath(homedir).replace("\\", "/")
homedir = str(homedir.replace("c:/", "c://"))
if platform.system() == "Windows":
- logger.error("BUG! Not erasing folder in Windows")
+ self.log.error("BUG! Not erasing folder in Windows")
return
shutil.rmtree(homedir)