fix path
Showing
2 changed files
with
10 additions
and
2 deletions
... | @@ -35,7 +35,11 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -35,7 +35,11 @@ class Command(BaseCommand, LoggerMixin): |
35 | else: | 35 | else: |
36 | date_str = date.strftime('%Y-%m-%d') | 36 | date_str = date.strftime('%Y-%m-%d') |
37 | 37 | ||
38 | excel_path = os.path.join(conf.LOG_DIR, 'bs_{0}.xlsx'.format(date_str)) | 38 | excel_dir = os.path.join(conf.DATA_DIR, 'AFC', 'Logs') |
39 | if not os.path.exists(excel_dir): | ||
40 | print('excel dir not exists') | ||
41 | return | ||
42 | excel_path = os.path.join(excel_dir, 'bs_{0}.xlsx'.format(date_str)) | ||
39 | log_path = os.path.join(conf.LOG_DIR, 'bs.log.{0}'.format(date_str)) | 43 | log_path = os.path.join(conf.LOG_DIR, 'bs.log.{0}'.format(date_str)) |
40 | if not os.path.exists(log_path): | 44 | if not os.path.exists(log_path): |
41 | print('log_path not exists') | 45 | print('log_path not exists') | ... | ... |
... | @@ -70,7 +70,11 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -70,7 +70,11 @@ class Command(BaseCommand, LoggerMixin): |
70 | else: | 70 | else: |
71 | date_str = date.strftime('%Y-%m-%d') | 71 | date_str = date.strftime('%Y-%m-%d') |
72 | 72 | ||
73 | excel_path = os.path.join(conf.LOG_DIR, 'license_{0}.xlsx'.format(date_str)) | 73 | excel_dir = os.path.join(conf.DATA_DIR, 'AFC', 'Logs') |
74 | if not os.path.exists(excel_dir): | ||
75 | print('excel dir not exists') | ||
76 | return | ||
77 | excel_path = os.path.join(excel_dir, 'license_{0}.xlsx'.format(date_str)) | ||
74 | log_path = os.path.join(conf.LOG_DIR, 'license.log.{0}'.format(date_str)) | 78 | log_path = os.path.join(conf.LOG_DIR, 'license.log.{0}'.format(date_str)) |
75 | if not os.path.exists(log_path): | 79 | if not os.path.exists(log_path): |
76 | print('log_path not exists') | 80 | print('log_path not exists') | ... | ... |
-
Please register or sign in to post a comment