optParameters = [
["basedir", "C", None, "which directory to create the client in"],
]
+ optFlags = [
+ ["quiet", "q", "operate silently"],
+ ]
def parseArgs(self, *args):
if len(args) > 0:
optParameters = [
["basedir", "C", None, "which directory to create the introducer in"],
]
+ optFlags = [
+ ["quiet", "q", "operate silently"],
+ ]
def parseArgs(self, *args):
if len(args) > 0:
f = open(os.path.join(basedir, "client.tac"), "w")
f.write(client_tac)
f.close()
- print "client created in %s" % basedir
- print " please copy introducer.furl and vdrive.furl into the directory"
+ if not config['quiet']:
+ print "client created in %s" % basedir
+ print " please copy introducer.furl and vdrive.furl into the directory"
def create_introducer(config):
basedir = config['basedir']
f = open(os.path.join(basedir, "introducer.tac"), "w")
f.write(introducer_tac)
f.close()
- print "introducer created in %s" % basedir
+ if not config['quiet']:
+ print "introducer created in %s" % basedir
def start(config):
basedir = config['basedir']
def test_client(self):
basedir = self.workdir("test_client")
c1 = os.path.join(basedir, "c1")
- argv = ["create-client", "--basedir", c1]
+ argv = ["create-client", "--basedir", c1, "--quiet"]
runner.runner(argv)
self.failUnless(os.path.exists(c1))
self.failUnless(os.path.exists(os.path.join(c1, "client.tac")))
def test_introducer(self):
basedir = self.workdir("test_introducer")
c1 = os.path.join(basedir, "c1")
- argv = ["create-introducer", "--basedir", c1]
+ argv = ["create-introducer", "--basedir", c1, "--quiet"]
runner.runner(argv)
self.failUnless(os.path.exists(c1))
self.failUnless(os.path.exists(os.path.join(c1, "introducer.tac")))