From 83d9e772e7dfcc8dc3b5b1be5417005b9431da15 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 20 Aug 2019 00:45:05 +0200 Subject: [PATCH] Nowadays we don't have .errno anymore ? --- moulinette/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moulinette/__init__.py b/moulinette/__init__.py index 1db22b60..92f76928 100755 --- a/moulinette/__init__.py +++ b/moulinette/__init__.py @@ -98,7 +98,7 @@ def api(namespaces, host='localhost', port=80, routes={}, except MoulinetteError as e: import logging logging.getLogger(namespaces[0]).error(e.strerror) - return e.errno + return e.errno if hasattr(e, "errno") else 1 except KeyboardInterrupt: import logging logging.getLogger(namespaces[0]).info(m18n.g('operation_interrupted'))