Ignore ps errors
This commit is contained in:
parent
d43e6174a2
commit
720e274c24
1 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ LOGGER_NAME = __name__
|
|||
app = Flask(__name__)
|
||||
|
||||
|
||||
@app.route('/', methods=['GET'])
|
||||
@app.route('/health', methods=['GET'])
|
||||
def home_view():
|
||||
# We check whether weechat is running
|
||||
url_regex = re.compile(
|
||||
|
@ -30,8 +30,8 @@ def home_view():
|
|||
for line in lines:
|
||||
if line.strip() == settings.PS_COMMAND:
|
||||
return 'OK\n', 200
|
||||
except subprocess.CalledProcessError as exn:
|
||||
return 'Internal error: {}\n'.format(exn), 500
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
return 'Weechat not running\n', 406
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue