From: Zooko O'Whielacronx Date: Fri, 17 Aug 2007 20:06:43 +0000 (-0700) Subject: command-line: remove some redundant options checking X-Git-Url: https://git.rkrishnan.org/uri/URI:DIR2-RO:%5B%5E?a=commitdiff_plain;h=e554962ac39de4184d91a380463f5c26abdc4f49;p=tahoe-lafs%2Ftahoe-lafs.git command-line: remove some redundant options checking --- diff --git a/src/allmydata/scripts/tahoe_get.py b/src/allmydata/scripts/tahoe_get.py index efaa5d0c..66e98313 100644 --- a/src/allmydata/scripts/tahoe_get.py +++ b/src/allmydata/scripts/tahoe_get.py @@ -3,9 +3,6 @@ import sys, urllib def get(nodeurl, vdrive, vdrive_file, local_file): - if not isinstance(nodeurl, basestring): - raise ValueError("nodeurl is required to be a string and look like \"http://HOSTNAMEORADDR:PORT\", not: %r" % (nodeurl,)) - if nodeurl[-1] != "/": nodeurl += "/" url = nodeurl + "vdrive/" + vdrive + "/" diff --git a/src/allmydata/scripts/tahoe_put.py b/src/allmydata/scripts/tahoe_put.py index 5475bde8..6a419740 100644 --- a/src/allmydata/scripts/tahoe_put.py +++ b/src/allmydata/scripts/tahoe_put.py @@ -10,12 +10,7 @@ def put(nodeurl, vdrive, vdrive_fname, local_fname, verbosity): @return: a Deferred which eventually fires with the exit code """ - if not isinstance(nodeurl, basestring): - raise ValueError("nodeurl is required to be a string and look like \"http://HOSTNAMEORADDR:PORT\", not: %r" % (nodeurl,)) - mo = NODEURL_RE.match(nodeurl) - if not mo: - raise ValueError("nodeurl is required to look like \"http://HOSTNAMEORADDR:PORT\", not: %r" % (nodeurl,)) host = mo.group(1) port = int(mo.group(3))