unload file has x'001a' (CTRL-Z) at the end after file transfer, and parse_t() tries to find the layout of the record for record type x'001a'. This results in KeyError, obviously:
File "/pyracf-dev-0.9/src/pyracf/__init__.py", line 324, in parse_t
offsets = RACF._recordtype_info[r]["offsets"]
KeyError: '\x1a'
We need to check if r in RACF._recordtype_info, or add a try:
Solved with fix in 0.9.
in def parse_t():
change if not thingswewant or r in thingswewant:
into if r in RACF._recordtype_info and (not thingswewant or r in thingswewant):
unload file has x'001a' (CTRL-Z) at the end after file transfer, and parse_t() tries to find the layout of the record for record type x'001a'. This results in KeyError, obviously:
We need to check if r in RACF._recordtype_info, or add a try: