python wants all commands to be a list
This resolves an error with pythons subprocess module, where it expects a list of command line arguments.
This commit is contained in:
parent
29927fd050
commit
6c2e5ff1d8
|
@ -55,14 +55,14 @@ if __name__ == "__main__":
|
|||
sys.exit(-1)
|
||||
if update['action'] == 'create_zone' and config.has_option('command', 'add_zone'):
|
||||
command = config.get('command', 'add_zone') % (update['zone_name'])
|
||||
subprocess.call(command)
|
||||
subprocess.call(command.split(' '))
|
||||
elif update['action'] != 'create_zone' and config.has_option('command', 'reload_zone'):
|
||||
command = config.get('command', 'reload_zone') % (update['zone_name'])
|
||||
subprocess.call(command)
|
||||
subprocess.call(command.split(' '))
|
||||
elif update['action'] == 'delete_zone':
|
||||
os.remove(filepath)
|
||||
if config.has_option('command', 'del_zone'):
|
||||
command = config.get('command', 'del_zone') % (update['zone_name'])
|
||||
subprocess.call(command)
|
||||
subprocess.call(command.split(' '))
|
||||
c.output_update_delete([update['id']])
|
||||
|
||||
|
|
Loading…
Reference in New Issue