mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
Merge pull request #9 from nebbywan/main
Add Python3 support at line 31 and fix case mismatch
This commit is contained in:
@@ -28,7 +28,10 @@ import csv
|
|||||||
# CONFIG CONSTANTS
|
# CONFIG CONSTANTS
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
PIALERT_PATH = os.path.dirname(os.path.abspath(__file__))
|
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()
|
file.close()
|
||||||
else:
|
else:
|
||||||
file = open (pPath, 'w', encoding='utf-8')
|
file = open (pPath, 'w', encoding='utf-8')
|
||||||
file.write (ptext)
|
file.write (pText)
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user