Update main.py

fixed argument log import
This commit is contained in:
Saifeddine ALOUI 2024-01-16 11:31:48 +01:00 committed by GitHub
parent f476c9a93b
commit b29a3c20a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ def main():
class RequestHandler(BaseHTTPRequestHandler): class RequestHandler(BaseHTTPRequestHandler):
def add_access_log_entry(self, user, ip_address, access, server): def add_access_log_entry(self, user, ip_address, access, server):
log_file_path = Path(sys.argv[1]) log_file_path = args.log_path
if not log_file_path.exists(): if not log_file_path.exists():
with open(log_file_path, mode='w', newline='') as csvfile: with open(log_file_path, mode='w', newline='') as csvfile: