]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blobdiff - modules/sign.py
- use str.count (thx atler)
[projects/pld-ftp-admin.git] / modules / sign.py
index 153ec67ea32a996d04f53edbdbbb6417524efa42..1a3fa5c1906eb83855622ca36b96ea71a9e03eec 100644 (file)
@@ -48,13 +48,11 @@ def signpkgs(files, password):
     os.putenv('LC_ALL', 'C')
     args = ['--resign', '--define', '_signature gpg', '--define', '_gpg_name ' + sign_key] + files
     child = pexpect.spawn('/bin/rpm', args)
-    child.logfile = sys.stderr
+    child.logfile_read = sys.stderr
     child.expect('Enter pass phrase:', timeout=30)
     child.sendline(password)
-    child.expect(pexpect.EOF)
+    child.expect(pexpect.EOF, timeout=None)
     child.close()
     rc = child.exitstatus
-    #cmd = ['/bin/rpm', '--resign', '--define', '_signature gpg', '--define', '_gpg_name ' + sign_key] + files
-    #rc = subprocess.call(cmd, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE, close_fds = True)
     if rc != 0:
         raise OSError, 'package signing failed'
This page took 0.028354 seconds and 4 git commands to generate.