]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
--quiet to silence some not interesting messages (usefull for cron job).
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 15 Jan 2011 15:52:22 +0000 (15:52 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 15 Jan 2011 15:52:22 +0000 (15:52 +0000)
Changed files:
    bin/pfa-genindex -> 1.29

bin/pfa-genindex

index 996b145e66038abfdbd01e82a5127fd4e541164b..fe58f58b0ff9af6474f6f9ebcebba62428687d01 100644 (file)
@@ -19,6 +19,7 @@ except getopt.GetoptError:
 do_poldek = True
 do_yum = True
 do_rpmrepo = False
+do_quiet = False
 
 for o, a in opts:
     if o == "--nopoldek":
@@ -35,6 +36,9 @@ for o, a in opts:
     if o == "--rpmrepo":
         do_rpmrepo = True
 
+    if o == "--quiet":
+        do_quiet = True
+
 if not do_poldek and not do_yum and not do_rpmrepo:
     print >>sys.stderr, "ERR: speciy at least one action"
     sys.exit(1)
@@ -52,7 +56,8 @@ for tree in trees:
     if ftpio.lock(tree, True):
         locked.append(tree)
     else:
-        print >>sys.stderr, "ERR: %s tree already locked" % tree
+        if not do_quiet:
+            print >>sys.stderr, "ERR: %s tree already locked" % tree
         for i in locked:
             ftpio.unlock(i)
         sys.exit(1)
This page took 0.035508 seconds and 4 git commands to generate.