From: David Stainton Date: Thu, 12 Nov 2015 14:47:25 +0000 (+0100) Subject: Add cli stub for magic-folder status command X-Git-Url: https://git.rkrishnan.org/pf/htmlfontify-example.html?a=commitdiff_plain;h=f660aa78ab02b90b3b8edf7521ed2a2515e0e7f2;p=tahoe-lafs%2Ftahoe-lafs.git Add cli stub for magic-folder status command --- diff --git a/src/allmydata/scripts/magic_folder_cli.py b/src/allmydata/scripts/magic_folder_cli.py index b31162e6..5d5c61dc 100644 --- a/src/allmydata/scripts/magic_folder_cli.py +++ b/src/allmydata/scripts/magic_folder_cli.py @@ -196,6 +196,17 @@ def leave(options): print >>options.stderr, ("Warning: unable to remove %s due to %s: %s" % (quote_local_unicode_path(f), e.__class__.__name__, str(e))) +class StatusOptions(BasedirOptions): + nickname = None + synopsis = "" + stdin = StringIO("") + def parseArgs(self): + BasedirOptions.parseArgs(self) + node_url_file = os.path.join(self['node-directory'], u"node.url") + self['node-url'] = open(node_url_file, "r").read().strip() + +def status(options): + # XXX todo: use http interface to ask about our magic-folder upload status return 0 class MagicFolderCommand(BaseOptions):