]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Add cli stub for magic-folder status command
authorDavid Stainton <dstainton415@gmail.com>
Thu, 12 Nov 2015 14:47:25 +0000 (15:47 +0100)
committermeejah <meejah@meejah.ca>
Mon, 8 Feb 2016 17:12:32 +0000 (10:12 -0700)
src/allmydata/scripts/magic_folder_cli.py

index b31162e66a8e536afadb2da073a7c7d74f60e1b2..5d5c61dc591a1c378536353ef870d07078ac8f15 100644 (file)
@@ -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):