From e554962ac39de4184d91a380463f5c26abdc4f49 Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Fri, 17 Aug 2007 13:06:43 -0700 Subject: [PATCH] command-line: remove some redundant options checking --- src/allmydata/scripts/tahoe_get.py | 3 --- src/allmydata/scripts/tahoe_put.py | 5 ----- 2 files changed, 8 deletions(-) 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)) -- 2.45.2