From: david-sarah <david-sarah@jacaranda.org>
Date: Sat, 22 Jan 2011 07:42:12 +0000 (-0700)
Subject: tahoe_rm.py: better error message when there is no path. refs #1292
X-Git-Tag: pre-393~85
X-Git-Url: https://git.rkrishnan.org/simplejson/components/com_hotproperty/status?a=commitdiff_plain;h=52963f4a76809cde0fdefa1d8eacc0a102de38b1;p=tahoe-lafs%2Ftahoe-lafs.git

tahoe_rm.py: better error message when there is no path. refs #1292
---

diff --git a/src/allmydata/scripts/tahoe_rm.py b/src/allmydata/scripts/tahoe_rm.py
index 3b133d08..51fb28c3 100644
--- a/src/allmydata/scripts/tahoe_rm.py
+++ b/src/allmydata/scripts/tahoe_rm.py
@@ -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)