Commit 1b9ab96d authored by grahamj's avatar grahamj Committed by canterburym
Browse files

Update file asn_process.py

parent be831a3c
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -16,12 +16,10 @@ def reconstrainInteger (filename):
    return 'temp.asn'

filesWithBigInts = [
    '102232-1/LI-PS-PDU.asn',
    '102232-3/IPAccessPDU.asn',
    '102232-4/L2AccessPDU.asn'
    'testing/dependencies/asn/stubs/LI-PS-PDU.asn',
    'testing/dependencies/asn/IPAccessPDU.asn'
]

asn1c_path = ""
change_path_to_unix = False

def fix_path(path):
@@ -45,10 +43,10 @@ def syntaxCheckASN(fileList):
        try:
            if file.as_posix() in filesWithBigInts:
                newFile = reconstrainInteger(str(file))
                p = run([asn1c_path, '-E', fix_path(newFile)], capture_output=True)
                p = run([asn1c, '-E', fix_path(newFile)], capture_output=True)
                Path(newFile).unlink()
            else:
                p = run([asn1c_path, '-E', fix_path(str(file))], capture_output=True)
                p = run([asn1c, '-E', fix_path(str(file))], capture_output=True)
            if (p.returncode != 0):
                errorMessage = p.stderr.decode().splitlines()[0]
                if errorMessage.startswith('   Value "18446744073709551615" at line'):