From 9aa2344fd488e66faa98bfb9f1548f3bae2f2ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sat, 29 Aug 2020 19:55:52 +0200 Subject: [PATCH] Reformat offlineimap/ui/debuglock.py Add some spaces, remove lines,... now format is better (lintian). --- offlineimap/ui/debuglock.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/offlineimap/ui/debuglock.py b/offlineimap/ui/debuglock.py index 673efb0..4757453 100644 --- a/offlineimap/ui/debuglock.py +++ b/offlineimap/ui/debuglock.py @@ -17,19 +17,21 @@ from threading import Lock, currentThread import traceback + logfile = open("/tmp/logfile", "wt") loglock = Lock() + class DebuggingLock: def __init__(self, name): self.lock = Lock() self.name = name - def acquire(self, blocking = 1): + def acquire(self, blocking=1): self.print_tb("Acquire lock") self.lock.acquire(blocking) - self.logmsg("===== %s: Thread %s acquired lock\n"% - (self.name, currentThread().getName())) + self.logmsg("===== %s: Thread %s acquired lock\n" % + (self.name, currentThread().getName())) def release(self): self.print_tb("Release lock") @@ -42,8 +44,6 @@ class DebuggingLock: loglock.release() def print_tb(self, msg): - self.logmsg(".... %s: Thread %s attempting to %s\n"% \ + self.logmsg(".... %s: Thread %s attempting to %s\n" % \ (self.name, currentThread().getName(), msg) + \ "\n".join(traceback.format_list(traceback.extract_stack()))) - -