From 509cf1e315dc64b33f65dae6b88f0a9606740943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 12 Jun 2013 14:06:57 +0200 Subject: [PATCH] wcsinstd: use os.system to reload apache --- wcsinst/wcsinstd/deploy.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/wcsinst/wcsinstd/deploy.py b/wcsinst/wcsinstd/deploy.py index 032bfbc..f82c5ff 100644 --- a/wcsinst/wcsinstd/deploy.py +++ b/wcsinst/wcsinstd/deploy.py @@ -156,14 +156,4 @@ class DeployInstance(object): def reload_apache(self): - fd = None - try: - fd = os.popen('sudo -S /etc/init.d/apache2 reload', 'w') - print >> fd, 'plop' # this is not the password - except Exception, e: - pass - if fd: - try: - fd.close() - except IOError: - pass + os.system('sudo -n /etc/init.d/apache2 reload')