Notarization fix.
authorCarl Hetherington <cth@carlh.net>
Tue, 13 Oct 2020 23:38:16 +0000 (01:38 +0200)
committerCarl Hetherington <cth@carlh.net>
Sat, 17 Oct 2020 19:33:57 +0000 (21:33 +0200)
cdist

diff --git a/cdist b/cdist
index 28c174ea95ad5485d5df54634a4aa3662a66c995..41b73d9f17d6dfe6614af7bbe2ff2e1cd08257b8 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -722,7 +722,7 @@ def notarize(dmg, bundle_id):
 
     for i in range(0, 30):
         print('Checking up on %s' % request_uuid)
-        p = subprocess.run(['xcrun', 'altool', '--notarization-info', request_uuid, '-u', apple_id, '-p', apple_password, '--output-format', 'xml'], capture_output=True)
+        p = subprocess.run(['xcrun', 'altool', '--notarization-info', request_uuid, '-u', config.get('apple_id'), '-p', config.get('apple_password'), '--output-format', 'xml'], capture_output=True)
         status = string_after(p, 'Status')
         print('Got %s' % status)
         if status == 'invalid':
@@ -792,8 +792,8 @@ class OSXSingleTarget(OSXTarget):
         for x in p:
             if not isinstance(x, tuple):
                 raise Error('macOS packages must be returned from cscript as tuples of (dmg-filename, bundle-id)')
-        if not no_notarize:
-            notarize(x[0], x[1])
+            if not no_notarize:
+                notarize(x[0], x[1])
         self._copy_packages(tree, [x[0] for x in p], output_dir)