Open mgualco-contractor opened 5 years ago
committed a fix
I recommend use of the standard glob
library. You can get a list of filenames with:
import glob
glob.glob('resources/mibs/*.mib')
# Returns a list: ['resources/mibs/ENTITY-MIB.mib', 'resources/mibs/IF-MIB.mib', 'resources/mibs/RFC1271-MIB.mib', 'resources/mibs/TCP-MIB.mib', ...]
And maybe there's some nice way to recurse and find other mib
files.
very good idea will implement ASAP
@mgualco-contractor Be sure to close this once it's done ;-)
In progress
Concern raised by @mbanders One other slight way to be safer is to change if 'mib' in name or 'mibs' in name to something like if name.endswith('mib') or name.endswith('mibs') just in case someone has someone has some directories that happen to have 'mib' inside the name