Commit b346b65c authored by Benjamin Graillot's avatar Benjamin Graillot Committed by root

[whos] os.system -> subprocess.run

parent 47ea74d7
......@@ -36,6 +36,6 @@ if __name__ == '__main__':
os.chdir('/var/www/re2o')
subprocess.run(['sudo', './manage.py', 'whos'] + sys.argv[1:])
elif host == 'thot':
os.system('ssh -qt re2o.adm.crans.org whos ' + shlex.quote(' '.join([shlex.quote(arg) for arg in sys.argv[1:]])))
subprocess.run(['ssh', '-qt', 're2o.adm.crans.org', 'whos'] + sys.argv[1:])
else:
print('Commande à lancer uniquement sur thot ou re2o-srv.')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment