diff --git a/stock/analysis/AnalyzerSqlite.py b/stock/analysis/AnalyzerSqlite.py index 19a2bb5..e140ebe 100644 --- a/stock/analysis/AnalyzerSqlite.py +++ b/stock/analysis/AnalyzerSqlite.py @@ -1002,7 +1002,7 @@ if __name__ == "__main__": dayList = os.listdir(outPath) for dayDir in dayList: if dayDir[0] != '.' and dayDir < before_7_day.strftime("%Y%m%d"): - if os.path.exists(os.path.join(outPath, dayDir)): + if os.path.exists(os.path.join(outPath, dayDir)) and os.path.isdir(os.path.join(outPath, dayDir)): shutil.rmtree(os.path.join(outPath, dayDir)) outPath = os.path.join(outPath, day)