only create directory for stocks when necessary
This avoids printing an inacurate error every time.
This commit is contained in:
@@ -82,6 +82,7 @@ class Stocks(inkycal_module):
|
||||
tmpPath = '/tmp/inkycal_stocks/'
|
||||
|
||||
try:
|
||||
if not os.path.exists(tmpPath):
|
||||
os.mkdir(tmpPath)
|
||||
except OSError:
|
||||
print(f"Creation of tmp directory {tmpPath} failed")
|
||||
|
Reference in New Issue
Block a user