Skip to content

Commit

Permalink
fix header modification on csv extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
lalepee committed Nov 16, 2023
1 parent 18d775e commit 60f31ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def check_env_var(required_env_var):
target_tc.import_from('extract_dir')
else:
# simple copy
logger.info(f"Running simple copy")
r = redis.Redis(twin_cache_host, twin_cache_port, password=twin_cache_password)
r.eval(
"""local o = redis.call('DUMP', KEYS[1]);\
Expand Down
2 changes: 1 addition & 1 deletion twincache_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def import_from(self, export_path: str):
os.makedirs(os.path.join(r, 'output'), exist_ok=True)
with open(file_path) as f, open(output_file_path, 'w') as out:
csv_r = csv.DictReader(f)
new_header = csv_r.fieldnames
new_header = csv_r.fieldnames[:]

st_m = list(map(lambda st: st[0] in new_header and st[1] in new_header, ST_DETECT))
if any(st_m):
Expand Down

0 comments on commit 60f31ff

Please sign in to comment.