Skip to content

Commit

Permalink
Fixes #16161: os.makedirs 'exist_ok' parameter does not exist in pyth…
Browse files Browse the repository at this point in the history
…on 2.7
  • Loading branch information
VinceMacBuche committed Nov 12, 2019
1 parent 914ed1f commit 91b6cb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion relay/sources/rudder-pkg/lib/rudder-pkg/rudderPkgUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def startLogger(logLevel):
fail("unknow loglevel %s"%(logLevel))

# log file logger
os.makedirs(os.path.dirname(LOG_PATH), exist_ok=True)
if not os.is_dir(os.path.dirname(LOG_PATH)):
os.makedirs(os.path.dirname(LOG_PATH))
fileHandler = logging.handlers.RotatingFileHandler(filename=LOG_PATH,maxBytes=1000000,backupCount=1)
fileHandler.setLevel(logging.DEBUG)
fileFormatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
Expand Down

0 comments on commit 91b6cb0

Please sign in to comment.