Adds absolute path to open file command
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import os
|
||||
import re
|
||||
import json
|
||||
|
||||
with open('access.log', 'r') as f:
|
||||
absPath = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
with open(absPath + os.sep + 'access.log', 'r') as f:
|
||||
logs = f.readlines()
|
||||
f.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user