lfcli_base fix if os.path.isdir command

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
Matthew Stidham
2021-11-15 15:35:11 -08:00
parent 3969a4710e
commit d0c40cb4b2

View File

@@ -537,7 +537,7 @@ class LFCliBase:
userhome=os.path.expanduser('~')
session = str(datetime.datetime.now().strftime("%Y-%m-%d-%H-h-%M-m-%S-s")).replace(':','-')
if filename is None:
if os.path.isdir("%s/report-data/%s" % (userhome, session)):
if not os.path.isdir("%s/report-data/%s" % (userhome, session)):
os.mkdir("%s/report-data/%s" % (userhome, session))
filename = ("%s/report-data/%s/%s.log" % (userhome,session,scriptname))
import logging