Skip to content

Commit

Permalink
[Version 0.2.1] Critical Fix
Browse files Browse the repository at this point in the history
- Fixed an issue that would prevent the program from launching in a fresh environment.
- Mandatory directories will now be created on startup, if they do not exist.
  • Loading branch information
ispingos committed Jul 31, 2020
1 parent de21493 commit 6531e1e
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions pytheas/pytheas.py
Expand Up @@ -49,8 +49,8 @@

global VERSION
global VERDATE
VERSION="0.2.0"
VERDATE="07/05/2020"
VERSION="0.2.1"
VERDATE="31/07/2020"

## first get script's path
import os
Expand Down Expand Up @@ -126,11 +126,24 @@
from lib import db_handler as DB
from lib import tools
from lib import parsers
# make 'logs' directory

#-- make required directories
try:
os.makedirs(os.path.join(WORKDIR, 'logs'))
except: # if folder already exists
pass
try:
os.makedirs(os.path.join(WORKDIR, 'etc', 'options'))
except: # if folder already exists
pass
try:
os.makedirs(os.path.join(WORKDIR, 'etc', 'evcor'))
except: # if folder already exists
pass
try:
os.makedirs(os.path.join(WORKDIR, 'etc', 'index'))
except: # if folder already exists
pass

# init the log file
logfile=WORKDIR+os.sep+"logs%s%s_Pytheas.log" % (os.sep,UTCDateTime().strftime("%Y%m%d%H%M%S"))
Expand Down

0 comments on commit 6531e1e

Please sign in to comment.