From: Mark Hymers Date: Sat, 3 May 2008 12:25:30 +0000 (+0100) Subject: clean up pychecker warnings X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=9d50949ce41dfe559c4bf28a13140f2fb2793eb8;p=dak.git clean up pychecker warnings --- diff --git a/dak/transitions.py b/dak/transitions.py index 5636624f..374beabb 100644 --- a/dak/transitions.py +++ b/dak/transitions.py @@ -183,9 +183,9 @@ def load_transitions(trans_file): ##################################### #### This may run within sudo !! #### ##################################### -def lock_file(file): +def lock_file(f): for retry in range(10): - lock_fd = os.open(file, os.O_RDWR | os.O_CREAT) + lock_fd = os.open(f, os.O_RDWR | os.O_CREAT) try: fcntl.lockf(lock_fd, fcntl.LOCK_EX | fcntl.LOCK_NB) return lock_fd @@ -197,7 +197,7 @@ def lock_file(file): else: raise - daklib.utils.fubar("Couldn't obtain lock for %s." % (lockfile)) + daklib.utils.fubar("Couldn't obtain lock for %s." % (f)) ################################################################################