diff --git a/src/kytuning/getenv.py b/src/kytuning/getenv.py index 2bac62cb718aa66c5126a4908a89827091b8cb05..d9e120c462019f43599fbe4444de934b80167e52 100644 --- a/src/kytuning/getenv.py +++ b/src/kytuning/getenv.py @@ -552,7 +552,11 @@ class EnvManager(object): # 导出环境信息到Json def collect(self): - return json.dumps(self.export_env_dict(), indent = 2) + try: + info_json = json.dumps(self.export_env_dict(), indent = 2) + except: + logging.error("export env info to json failed!") + return info_json if __name__ == '__main__':