git-migration: pldpkg.py - print errors to stderr - exit with code 1 when c...
draenog
draenog at pld-linux.org
Mon Apr 4 21:00:39 CEST 2011
Author: draenog Date: Mon Apr 4 19:00:39 2011 GMT
Module: git-migration Tag: HEAD
---- Log message:
- print errors to stderr
- exit with code 1 when cannot dalete or add package
---- Files affected:
git-migration:
pldpkg.py (1.3 -> 1.4)
---- Diffs:
================================================================
Index: git-migration/pldpkg.py
diff -u git-migration/pldpkg.py:1.3 git-migration/pldpkg.py:1.4
--- git-migration/pldpkg.py:1.3 Fri Feb 18 23:50:02 2011
+++ git-migration/pldpkg.py Mon Apr 4 21:00:33 2011
@@ -102,13 +102,15 @@
command, package = args
if command == 'add':
if p.exists(package):
- print "%r already exists in %r" % (package, p.project)
+ print >> sys.stderr, "%r already exists in %r" % (package, p.project)
+ sys.exit(1)
else:
p.add(package)
print "added %r to %r" % (package, p.project)
if command == 'delete':
if not p.exists(package):
- print "%r does not exist in %r" % (package, p.project)
+ print >> sys.stderr, "%r does not exist in %r" % (package, p.project)
+ sys.exit(1)
else:
p.delete(package)
print "removed %r from %r" % (package, p.project)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/git-migration/pldpkg.py?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list