]> git.decadent.org.uk Git - dak.git/commitdiff
Some code cleanups
authorLuca Falavigna <dktrkranz@debian.org>
Sun, 1 Aug 2010 20:35:44 +0000 (20:35 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Sun, 1 Aug 2010 20:35:44 +0000 (20:35 +0000)
Signed-off-by: Luca Falavigna <dktrkranz@debian.org>
dak/rm.py
tools/rm822.py

index 2d502e08418f501352bb404aadb5633d9504c367..2bd96eec7d6cca923e39c6d285b2d7a282b3bccb 100755 (executable)
--- a/dak/rm.py
+++ b/dak/rm.py
@@ -520,19 +520,19 @@ def main ():
                 if element[2].find("source") > 0:
                     sources.append("%s_%s" % tuple(elem.strip(" ") for elem in element[:2]))
                     element[2] = sub("source\s?,?", "", element[2]).strip(" ")
-                if len(element[2]):
+                if element[2]:
                     binaries.append("%s_%s [%s]" % tuple(elem.strip(" ") for elem in element))
-    if len(sources):
+    if sources:
         logfile822.write("Sources:\n")
         for source in sources:
             logfile822.write(" %s\n" % source)
-    if len(binaries):
+    if binaries:
         logfile822.write("Binaries:\n")
         for binary in binaries:
             logfile822.write(" %s\n" % binary)
-    logfile822.write("Reason: %s\n" % (Options["Reason"]))
+    logfile822.write("Reason: %s\n" % Options["Reason"])
     if Options["Done"]:
-        logfile822.write("Bug: %s\n" % (Options["Done"]))
+        logfile822.write("Bug: %s\n" % Options["Done"])
     logfile822.write("\n")
     logfile822.flush()
     logfile822.close()
index 3fd912773b6d3656cede95bce763c883ab5cf500..57a5060d3e6b32e97f80dcbac84763fd39419638 100755 (executable)
@@ -32,13 +32,13 @@ for removal in removals:
                 if element[2].find('source') > 0:
                     sources.append(' %s_%s' % tuple(elem.strip(' ') for elem in element[:2]))
                     element[2] = re.sub('source\s?,?', '', element[2]).strip(' ')
-                if len(element[2]):
+                if element[2]:
                     binaries.append(' %s_%s [%s]' % tuple(elem.strip(' ') for elem in element))
-    if len(sources):
+    if sources:
         print 'Sources:'
         for source in sources:
             print source
-    if len(binaries):
+    if binaries:
         print 'Binaries:'
         for binary in binaries:
             print binary