mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-03-26 05:27:38 +00:00
CLI: Support for https url in option --node-url
This patch modifies the regular expression used for verifying of '--node-url' parameter. Support for accessing a Tahoe gateway over HTTPS was already present, thanks to Python's urllib.
This commit is contained in:
parent
e2031aff0f
commit
dd95e8e71b
src/allmydata
@ -2,7 +2,7 @@ import os.path, re, sys, fnmatch
|
||||
from twisted.python import usage
|
||||
from allmydata.scripts.common import BaseOptions, get_aliases
|
||||
|
||||
NODEURL_RE=re.compile("http://([^:]*)(:([1-9][0-9]*))?")
|
||||
NODEURL_RE=re.compile("http(s?)://([^:]*)(:([1-9][0-9]*))?")
|
||||
|
||||
class VDriveOptions(BaseOptions, usage.Options):
|
||||
optParameters = [
|
||||
|
@ -88,6 +88,11 @@ class CLI(unittest.TestCase):
|
||||
"--node-url", "http://localhost:8080"])
|
||||
self.failUnlessEqual(o["node-url"], "http://localhost:8080/")
|
||||
|
||||
o = cli.ListOptions()
|
||||
o.parseOptions(["--node-directory", "cli/test_options",
|
||||
"--node-url", "https://localhost/"])
|
||||
self.failUnlessEqual(o["node-url"], "https://localhost/")
|
||||
|
||||
def _dump_cap(self, *args):
|
||||
config = debug.DumpCapOptions()
|
||||
config.stdout,config.stderr = StringIO(), StringIO()
|
||||
|
Loading…
x
Reference in New Issue
Block a user