Merge pull request #9 from nebbywan/main

Add Python3 support at line 31 and fix case mismatch
This commit is contained in:
pucherot
2021-01-12 21:17:09 +01:00
committed by GitHub

View File

@@ -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()
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------