mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-11 21:01:44 +00:00
command-line: remove some redundant options checking
This commit is contained in:
parent
bffd0c97f5
commit
e554962ac3
@ -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 + "/"
|
||||
|
@ -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))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user