diff --git a/app.py b/app.py index 2a45395..f07158b 100644 --- a/app.py +++ b/app.py @@ -85,6 +85,8 @@ def run_import(): try: print(f'Processing line {line_count}: {row}') nickname, full_name, card, phone, email, gender = row + print(nickname, full_name, card, phone, email, gender) + log_file.write(f'String: [{line_count}]- {nickname}, {full_name}, {card}, {phone}, {email}, {gender}\n') # strip whitespaces nickname = nickname.strip() @@ -148,10 +150,13 @@ def run_import(): ) if user_created: print('User created with', data['ID'], data['DIN']) + log_file.write(f'Line: [{line_count}]- User created with: {data}\n') else: - log_file.write(f'error in line: [{line_count}]- Invalid user data: {data}\n') + log_file.write(f'error creating user in line: [{line_count}]- Invalid user data: {data}\n') else: - print('User found with', data['DIN'], user_card) + log_file.write(f'Line: [{line_count}]- User found with: {data}\n') + print('User found with ',user_card, data) + # print('User found with', data['DIN'], user_card) end_time = time.time() print(f'Elapsed time of USERS file processing : {end_time - start_time} seconds')