etingof / pysmi

SNMP MIB parser
http://snmplabs.com/pysmi/
BSD 2-Clause "Simplified" License
137 stars 52 forks source link

Fix MIB compilation with Python reserved keywords #68

Open TCheruy opened 1 year ago

TCheruy commented 1 year ago

PySMI would fail to compile mibs that uses symbols that are Python reserved keywords. Because the underlying PySNMP MIB representation is stored in Python files, those symbols are prefixed with pysmi_ here. However, this prefix need to be striped in this check for the compilation to complete. This PR handles this.

lextm commented 9 months ago

Cherry picked in https://github.com/lextudio/pysmi and shipped in 1.3.0 release.