diff --git a/openvpn_monitor/__init__.py b/openvpn_monitor/__init__.py index e69de29..4f71d34 100644 --- a/openvpn_monitor/__init__.py +++ b/openvpn_monitor/__init__.py @@ -0,0 +1,6 @@ +import os +import sys + +cwd = os.path.dirname(__file__) +os.chdir(cwd) +sys.path.append(cwd) diff --git a/openvpn_monitor/app.py b/openvpn_monitor/app.py index 212b347..aeb2683 100644 --- a/openvpn_monitor/app.py +++ b/openvpn_monitor/app.py @@ -25,15 +25,11 @@ from flask_wtf import CSRFProtect from humanize import naturalsize from pprint import pformat - -cwd = os.path.dirname(__file__) -os.chdir(cwd) -sys.path.append(cwd) -from config.loader import ConfigLoader # noqa -from vpns.openvpn.data_collector import VPNDataCollector # noqa -from vpns.openvpn.disconnector import VPNDisconnector # noqa -from location_data.maxmind.geoip import GeoipDBLoader # noqa -from util import is_truthy # noqa +from config.loader import ConfigLoader +from vpns.openvpn.data_collector import VPNDataCollector +from vpns.openvpn.disconnector import VPNDisconnector +from location_data.maxmind.geoip import GeoipDBLoader +from util import is_truthy logging.basicConfig(stream=sys.stderr, format='[%(asctime)s] [%(process)d] [%(levelname)s] %(message)s') logging.getLogger().setLevel(logging.INFO)