command-line: remove some redundant options checking

This commit is contained in:
Zooko O'Whielacronx 2007-08-17 13:06:43 -07:00
parent bffd0c97f5
commit e554962ac3
2 changed files with 0 additions and 8 deletions

View File

@ -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 + "/"

View File

@ -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))