chiark / gitweb /
Merge branch 'bug-fixes-for-v0.2.1' of https://gitlab.com/eighthave/fdroidserver
[fdroidserver.git] / fdroid
diff --git a/fdroid b/fdroid
index 9b5e120c0c9ce3476826cfa3fb1c1638116ab804..a2035fa2318d99f1ab5c468eec124b5f688482d3 100755 (executable)
--- a/fdroid
+++ b/fdroid
@@ -25,6 +25,7 @@ commands = {
     "build": "Build a package from source",
     "init": "Quickly start a new repository",
     "publish": "Sign and place packages in the repo",
+    "gpgsign": "Add gpg signatures for packages in repo",
     "update": "Update repo information for new packages",
     "verify": "Verify the integrity of downloaded packages",
     "checkupdates": "Check for updates to applications",
@@ -44,7 +45,7 @@ def print_help():
     print
     print "Valid commands are:"
     for cmd, summary in commands.items():
-        print "   " + cmd + ' '*(15-len(cmd)) + summary
+        print "   " + cmd + ' ' * (15 - len(cmd)) + summary
     print
 
 
@@ -82,7 +83,14 @@ def main():
 
     del sys.argv[1]
     mod = __import__('fdroidserver.' + command, None, None, [command])
-    mod.main()
+    try:
+        mod.main()
+    except Exception, e:
+        if verbose:
+            raise
+        else:
+            print str(e)
+        sys.exit(1)
     sys.exit(0)
 
 if __name__ == "__main__":