From 70ddd1c86f5bdc0e3faf1336d8a61acdc95c456b Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Feb 2023 17:55:17 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index adb6c8ed2..f815fd21c 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -48,19 +48,20 @@ def getInitDFile(): 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