From 52963f4a76809cde0fdefa1d8eacc0a102de38b1 Mon Sep 17 00:00:00 2001 From: david-sarah Date: Sat, 22 Jan 2011 00:42:12 -0700 Subject: [PATCH] tahoe_rm.py: better error message when there is no path. refs #1292 --- src/allmydata/scripts/tahoe_rm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.45.2