mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Update pialert.py
Add support for Python3 @ line 31 Fix case mismatch @ line 1216
This commit is contained in:
@@ -28,7 +28,10 @@ import csv
|
||||
# CONFIG CONSTANTS
|
||||
#===============================================================================
|
||||
PIALERT_PATH = os.path.dirname(os.path.abspath(__file__))
|
||||
execfile (PIALERT_PATH + "/pialert.conf")
|
||||
if (sys.version_info > (3,0)):
|
||||
exec(open(PIALERT_PATH + "/pialert.conf").read())
|
||||
else:
|
||||
execfile (PIALERT_PATH + "/pialert.conf")
|
||||
|
||||
|
||||
#===============================================================================
|
||||
@@ -1210,7 +1213,7 @@ def write_file (pPath, pText):
|
||||
file.close()
|
||||
else:
|
||||
file = open (pPath, 'w', encoding='utf-8')
|
||||
file.write (ptext)
|
||||
file.write (pText)
|
||||
file.close()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user