From f102cb7c01dc4caafc105777b5b269efd794a861 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Fri, 24 Jan 2020 10:01:55 -0600 Subject: [PATCH] Fix import conf.py --- VERSION | 2 +- source/app/controllers/comercio/comercio.py | 10 +++++++--- source/app/controllers/comercio/conf.py.example | 2 +- source/app/settings.py | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index 7aa332e..02261be 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.33.0 +1.33.1 diff --git a/source/app/controllers/comercio/comercio.py b/source/app/controllers/comercio/comercio.py index a6e625b..21292a9 100644 --- a/source/app/controllers/comercio/comercio.py +++ b/source/app/controllers/comercio/comercio.py @@ -23,8 +23,6 @@ import lxml.etree as ET import requests from requests.exceptions import ConnectionError -from .conf import DEBUG, AUTH - LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s' LOG_DATE = '%d/%m/%Y %H:%M:%S' @@ -33,10 +31,16 @@ logging.addLevelName(logging.DEBUG, '\x1b[33mDEBUG\033[1;0m') logging.addLevelName(logging.INFO, '\x1b[32mINFO\033[1;0m') logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT, datefmt=LOG_DATE) log = logging.getLogger(__name__) - logging.getLogger('requests').setLevel(logging.ERROR) +try: + from .conf import DEBUG, AUTH +except ImportError: + DEBUG = False + log.error('Need make conf.py') + + TIMEOUT = 10 diff --git a/source/app/controllers/comercio/conf.py.example b/source/app/controllers/comercio/conf.py.example index 4e89d68..de81efb 100644 --- a/source/app/controllers/comercio/conf.py.example +++ b/source/app/controllers/comercio/conf.py.example @@ -24,7 +24,7 @@ # ~ con una cuenta de reseller -DEBUG = True +DEBUG = False AUTH = { diff --git a/source/app/settings.py b/source/app/settings.py index 91ae2c8..c77b7c4 100644 --- a/source/app/settings.py +++ b/source/app/settings.py @@ -47,7 +47,7 @@ except ImportError: DEBUG = DEBUG -VERSION = '1.33.0' +VERSION = '1.33.1' EMAIL_SUPPORT = ('soporte@empresalibre.mx',) TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)