diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 18a398605..121190493 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -265,9 +265,7 @@ def initdUinstall(): def runInfo(): - # 取Openresty负载状态 - try: url = 'http://' + mw.getHostAddr() + '/nginx_status' result = mw.httpGet(url) @@ -294,7 +292,7 @@ def runInfo(): data['Writing'] = tmp[13] data['Waiting'] = tmp[15] return mw.getJson(data) - else: + except Exception as e: return 'oprenresty not started' diff --git a/plugins/php/index.py b/plugins/php/index.py index c4b189bf9..fe6be8eca 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -549,7 +549,7 @@ def getFpmStatus(version): data = json.loads(result) fTime = time.localtime(int(data['start time'])) data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) - else: + except Exception as e: data = {} return mw.getJson(data)