pld-ftp-admin: scripts/gen-indexes.py --quiet to silence some not interesti...

arekm arekm at pld-linux.org
Sat Jan 15 16:52:27 CET 2011


Author: arekm                        Date: Sat Jan 15 15:52:27 2011 GMT
Module: pld-ftp-admin                 Tag: HEAD
---- Log message:
--quiet to silence some not interesting messages (usefull for cron job).

---- Files affected:
pld-ftp-admin/scripts:
   gen-indexes.py (1.28 -> 1.29) 

---- Diffs:

================================================================
Index: pld-ftp-admin/scripts/gen-indexes.py
diff -u pld-ftp-admin/scripts/gen-indexes.py:1.28 pld-ftp-admin/scripts/gen-indexes.py:1.29
--- pld-ftp-admin/scripts/gen-indexes.py:1.28	Wed Feb  3 14:34:17 2010
+++ pld-ftp-admin/scripts/gen-indexes.py	Sat Jan 15 16:52:22 2011
@@ -19,6 +19,7 @@
 do_poldek = True
 do_yum = True
 do_rpmrepo = False
+do_quiet = False
 
 for o, a in opts:
     if o == "--nopoldek":
@@ -35,6 +36,9 @@
     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 @@
     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)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-ftp-admin/scripts/gen-indexes.py?r1=1.28&r2=1.29&f=u



More information about the pld-cvs-commit mailing list