[Zope3-checkins] CVS: Zope3/src/zope/fssync - main.py:1.16

Guido van Rossum guido@python.org
Thu, 29 May 2003 14:23:35 -0400


Update of /cvs-repository/Zope3/src/zope/fssync
In directory cvs.zope.org:/tmp/cvs-serv31003

Modified Files:
	main.py 
Log Message:
add() and remove() should raise Usage() when called without arguments.


=== Zope3/src/zope/fssync/main.py 1.15 => 1.16 ===
--- Zope3/src/zope/fssync/main.py:1.15	Thu May 15 18:22:58 2003
+++ Zope3/src/zope/fssync/main.py	Thu May 29 14:23:34 2003
@@ -199,6 +199,8 @@
     objects.  Each TARGET must exist.  The next commit will add them
     to the Zope 3 server.
     """
+    if not args:
+        raise Usage("add requires at least one TARGET argument")
     fs = FSSync()
     for a in args:
         fs.add(a)
@@ -210,6 +212,8 @@
     objects.  No TARGET must exist.  The next commit will remove them
     from the Zope 3 server.
     """
+    if not args:
+        raise Usage("remove requires at least one TARGET argument")
     fs = FSSync()
     for a in args:
         fs.remove(a)