fix ftp
This commit is contained in:
@@ -31,7 +31,7 @@ def on_file_received(self: object, file: str) -> None:
|
||||
new_filename = f"{filename}_{timestamp}{fileExtension}"
|
||||
os.rename(file, f"{path}/{new_filename}")
|
||||
if (fileExtension.upper() in (cfg.fileext)):
|
||||
with open(file, 'r', encoding='utf-8', errors='ignore') as csvfile:
|
||||
with open(f"{path}/{new_filename}", 'r', encoding='utf-8', errors='ignore') as csvfile:
|
||||
lines = csvfile.readlines()
|
||||
|
||||
unit_name = extract_value(cfg.units_name, filename, str(lines[0:10]))
|
||||
|
||||
Reference in New Issue
Block a user