chiark / gitweb /
chmod keystore after checking whether it was created
authorHans-Christoph Steiner <hans@eds.org>
Fri, 31 Jul 2015 13:54:50 +0000 (15:54 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Fri, 31 Jul 2015 22:38:41 +0000 (00:38 +0200)
On OSX, when Java is not installed, it'll fail to create the keystore, but
then give an error from chmod failing.  This changes things so that the
missing Java is reported instead.

fdroidserver/common.py

index 4d6dff4746fee6ad9e2362e11048338da06192f6..32db17d3acfc74cd249f9f69e27784ef7e8ebb5e 100644 (file)
@@ -2051,9 +2051,9 @@ def genkeystore(localconfig):
                      '-keypass:file', config['keypassfile'],
                      '-dname', localconfig['keydname']])
     # TODO keypass should be sent via stdin
-    os.chmod(localconfig['keystore'], 0o0600)
     if p.returncode != 0:
         raise BuildException("Failed to generate key", p.output)
+    os.chmod(localconfig['keystore'], 0o0600)
     # now show the lovely key that was just generated
     p = FDroidPopen(['keytool', '-list', '-v',
                      '-keystore', localconfig['keystore'],