Write get_postgresql_status exception into log file

This commit is contained in:
Alexander Kukushkin
2015-05-24 15:57:10 +02:00
parent 755f54f266
commit db34e1f458
+1
View File
@@ -20,6 +20,7 @@ class RestApiHandler(BaseHTTPRequestHandler):
try:
response = self.get_postgresql_status()
except (psycopg2.OperationalError, psycopg2.InterfaceError):
logging.exception('get_postgresql_status')
response = {'running': False}
path = '/master' if self.path == '/' else self.path