import shutil
def main():
- subprocess.call(['kinit', '-k', 'daemon/%s' % config.web.hostname])
+ call(['kinit', '-k', 'daemon/%s' % config.web.hostname])
temp_dir = tempfile.mkdtemp()
keystore = os.path.join(temp_dir, 'trust.store')
for host in config.hosts:
- cert = subprocess.Popen(['remctl', config.remote.hostname, 'web',
- 'vnccert', host.hostname],
- stdout=PIPE)
+ cert = Popen(['remctl', config.remote.hostname, 'web', 'vnccert', host.hostname],
+ stdout=PIPE)
cert.wait()
- subprocess.call(['keytool', '-import', '-noprompt', '-alias',
- host.hostname, '-keystore', keystore, '-storepass',
- 'foobar'], stdin=cert.stdout)
+ call(['keytool', '-import', '-noprompt', '-alias', host.hostname,
+ '-keystore', keystore, '-storepass', 'foobar'],
+ stdin=cert.stdout)
- subprocess.call(['jar', 'uf', '/usr/share/invirt-vnc-client/VncViewer.jar',
- '-C', temp_dir, 'trust.store'])
+ call(['jar', 'uf', '/usr/share/invirt-vnc-client/VncViewer.jar',
+ '-C', temp_dir, 'trust.store'])
shutil.rmtree(temp_dir)