From 6c2e5ff1d818a25e903f2fe61043e9d321e68931 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Thu, 27 Feb 2020 19:01:55 +0100 Subject: [PATCH] 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. --- dim_output_bind | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dim_output_bind b/dim_output_bind index b43ae8d..75bb2e9 100644 --- a/dim_output_bind +++ b/dim_output_bind @@ -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']])