diff --git a/plugins/mysql-apt/index.py b/plugins/mysql-apt/index.py index 4e115652e..73f663387 100755 --- a/plugins/mysql-apt/index.py +++ b/plugins/mysql-apt/index.py @@ -55,19 +55,20 @@ def is_number(s): def getArgs(): args = sys.argv[2:] - tmp = {} args_len = len(args) - if args_len == 1: t = args[0].strip('{').strip('}') - t = t.split(':') + if t.strip() == '': + tmp = [] + else: + t = t.split(':', 1) + tmp[t[0]] = t[1] tmp[t[0]] = t[1] elif args_len > 1: for i in range(len(args)): - t = args[i].split(':') + t = args[i].split(':', 1) tmp[t[0]] = t[1] - return tmp diff --git a/plugins/mysql-yum/index.py b/plugins/mysql-yum/index.py index 2539c7de9..fda6c4788 100755 --- a/plugins/mysql-yum/index.py +++ b/plugins/mysql-yum/index.py @@ -46,19 +46,20 @@ def getServerDir(): def getArgs(): args = sys.argv[2:] - tmp = {} args_len = len(args) - if args_len == 1: t = args[0].strip('{').strip('}') - t = t.split(':') + if t.strip() == '': + tmp = [] + else: + t = t.split(':', 1) + tmp[t[0]] = t[1] tmp[t[0]] = t[1] elif args_len > 1: for i in range(len(args)): - t = args[i].split(':') + t = args[i].split(':', 1) tmp[t[0]] = t[1] - return tmp