From f660aa78ab02b90b3b8edf7521ed2a2515e0e7f2 Mon Sep 17 00:00:00 2001
From: David Stainton <dstainton415@gmail.com>
Date: Thu, 12 Nov 2015 15:47:25 +0100
Subject: [PATCH] Add cli stub for magic-folder status command

---
 src/allmydata/scripts/magic_folder_cli.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

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):
-- 
2.45.2