extra messages printed only when verbose option is specified
authorCiro Scognamiglio <moray@hera.cslash.net>
Fri, 17 Aug 2012 17:13:53 +0000 (19:13 +0200)
committerCiro Scognamiglio <moray@hera.cslash.net>
Fri, 17 Aug 2012 17:13:53 +0000 (19:13 +0200)
scripts/clean-backupdb.py

index 7a3e1aa..1d993c6 100755 (executable)
@@ -287,7 +287,8 @@ class Index:
         for filename in filenames:
             (b,p,s,d) = parse_filename (filename)
             if not b:
-                print "Filename %s does not match - skipped"%filename
+               if self.options.verbose:
+                    print "Filename %s does not match - skipped"%filename
                 continue
             self.insert (dir, filename, p, s, d)
 
@@ -363,8 +364,8 @@ def main ():
     index.cleanup()
     if (options.summary) :
         index.summary()
-    
-    print 'Found %d entries to unlink'%counter
+    if options.verbose:
+        print 'Found %d entries to unlink'%counter
             
 if __name__ == '__main__':
     main()