]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
tahoe_rm.py: better error message when there is no path. refs #1292
authordavid-sarah <david-sarah@jacaranda.org>
Sat, 22 Jan 2011 07:42:12 +0000 (00:42 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Sat, 22 Jan 2011 07:42:12 +0000 (00:42 -0700)
src/allmydata/scripts/tahoe_rm.py

index 3b133d089e07730596b6ee4992a3586717c47021..51fb28c35125c30771889ca7973381e9aeaa9d30 100644 (file)
@@ -21,7 +21,11 @@ def rm(options):
     except UnknownAliasError, e:
         e.display(stderr)
         return 1
-    assert path
+    if not path:
+        print >>stderr, """
+'tahoe rm' can only unlink directory entries, so a path must be given."""
+        return 1
+
     url = nodeurl + "uri/%s" % urllib.quote(rootcap)
     url += "/" + escape_path(path)