]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Change return values to constants either 0 or -1
authorDavid Stainton <dstainton415@gmail.com>
Tue, 23 Jun 2015 21:16:21 +0000 (14:16 -0700)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 15 Sep 2015 16:56:00 +0000 (17:56 +0100)
src/allmydata/scripts/magic_folder_cli.py

index 09fbc688e5ccfbdacadc441dd6edd91ff2363839..a86e6439cb734f82a2db42da4c01f4a113f691cc 100644 (file)
@@ -57,7 +57,7 @@ def create(options):
         if rc != 0:
             print >>options.stderr, "magic-folder: failed to invite after create\n"
             return -1
-    return rc
+    return 0
 
 def diminish_readonly(write_cap, node_url):
     """
@@ -109,7 +109,7 @@ def invite(options):
     if rc != 0:
         # XXX failure
         print >>options.stderr, "magic-folder: failed to mkdir\n"
-        return rc
+        return -1
     dmd_write_cap = mkdir_options.stdout.getvalue().strip()
     dmd_readonly_cap = diminish_readonly(dmd_write_cap, options["node-url"])
     if dmd_readonly_cap is None:
@@ -136,7 +136,7 @@ def invite(options):
         return -1
 
     print >>options.stdout, "%s%s%s" % (magic_readonly_cap, INVITE_SEPERATOR, dmd_write_cap)
-    return rc
+    return 0
 
 class JoinOptions(BasedirOptions):
     synopsis = "INVITE_CODE LOCAL_DIR"