Relative imports

This commit is contained in:
Davte 2019-07-20 13:10:33 +02:00
parent 44857fd45f
commit 18ff1ad84e
2 changed files with 4 additions and 4 deletions

View File

@ -3,6 +3,6 @@
__author__ = "Davide Testa"
__email__ = "davide@davte.it"
__license__ = "GNU General Public License v3.0"
__version__ = "1.0.4"
__version__ = "1.0.5"
__maintainer__ = "Davide Testa"
__contact__ = "t.me/davte"

View File

@ -59,15 +59,15 @@ supported_languages = {
if __name__ == '__main__':
path = os.path.dirname(__file__)
try:
from data.config import log_file_name
from .data.config import log_file_name
except ImportError:
log_file_name = 'CicloPi.info.log'
try:
from data.config import errors_file_name
from .data.config import errors_file_name
except ImportError:
errors_file_name = 'CicloPi.errors.log'
try:
from data.config import local_host, port
from .data.config import local_host, port
except ImportError:
local_host, port = '127.0.0.1', 3000
log_file = f"{path}/data/{log_file_name}"