subprocess.call doesn't accept a string without shell=True

This commit is contained in:
Andy Teijelo Pérez 2015-11-06 19:44:45 -05:00
parent 69314b2c7f
commit a213295b7c

View file

@ -19,7 +19,7 @@ import os
app = Flask("main") app = Flask("main")
app.secret_key = "6ab77f3c45447429c2ae163c260a626029519a66450e474c" app.secret_key = "6ab77f3c45447429c2ae163c260a626029519a66450e474c"
users_file = "/etc/freeradius/users.dpto2" users_file = "/etc/freeradius/dpto2/users"
dhcp_hosts_file = "/etc/dnsmasq.d/dpto2/dhcp-hosts" dhcp_hosts_file = "/etc/dnsmasq.d/dpto2/dhcp-hosts"
dhcp_opts_file = "/etc/dnsmasq.d/dpto2/dhcp-opts" dhcp_opts_file = "/etc/dnsmasq.d/dpto2/dhcp-opts"
impossible_mac = "ff:ff:ff:ff:ff:fe" impossible_mac = "ff:ff:ff:ff:ff:fe"
@ -46,10 +46,10 @@ exclusive_lock = Lock(lock_file)
shared_lock = SharedLock(lock_file) shared_lock = SharedLock(lock_file)
def reload_freeradius(): def reload_freeradius():
call("./sendhup freeradius") call("./sendhup freeradius".split())
def reload_dnsmasq(): def reload_dnsmasq():
call("./sendhup dnsmasq") call("./sendhup dnsmasq".split())
def delete_user(deluser): def delete_user(deluser):
f = open(users_file) f = open(users_file)