summaryrefslogtreecommitdiff
path: root/pysnmp/smi/compiler.py
diff options
context:
space:
mode:
Diffstat (limited to 'pysnmp/smi/compiler.py')
-rw-r--r--pysnmp/smi/compiler.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/pysnmp/smi/compiler.py b/pysnmp/smi/compiler.py
index 08e38811..231685f8 100644
--- a/pysnmp/smi/compiler.py
+++ b/pysnmp/smi/compiler.py
@@ -7,15 +7,15 @@
import os
import sys
-defaultSources = ['file:///usr/share/snmp/mibs', 'file:///usr/share/mibs']
+DEFAULT_SOURCES = ['file:///usr/share/snmp/mibs', 'file:///usr/share/mibs']
if sys.platform[:3] == 'win':
- defaultDest = os.path.join(os.path.expanduser("~"),
+ DEFAULT_DEST = os.path.join(os.path.expanduser("~"),
'PySNMP Configuration', 'mibs')
else:
- defaultDest = os.path.join(os.path.expanduser("~"), '.pysnmp', 'mibs')
+ DEFAULT_DEST = os.path.join(os.path.expanduser("~"), '.pysnmp', 'mibs')
-defaultBorrowers = []
+DEFAULT_BORROWERS = []
try:
from pysmi.reader.url import getReadersFromUrls
@@ -50,16 +50,16 @@ else:
compiler = MibCompiler(parserFactory(**smiV1Relaxed)(),
PySnmpCodeGen(),
- PyFileWriter(kwargs.get('destination') or defaultDest))
+ PyFileWriter(kwargs.get('destination') or DEFAULT_DEST))
- compiler.addSources(*getReadersFromUrls(*kwargs.get('sources') or defaultSources))
+ compiler.addSources(*getReadersFromUrls(*kwargs.get('sources') or DEFAULT_SOURCES))
compiler.addSearchers(StubSearcher(*baseMibs))
compiler.addSearchers(*[PyPackageSearcher(x.fullPath()) for x in mibBuilder.getMibSources()])
compiler.addBorrowers(*[PyFileBorrower(x, genTexts=mibBuilder.loadTexts) for x in
- getReadersFromUrls(*kwargs.get('borrowers') or defaultBorrowers,
+ getReadersFromUrls(*kwargs.get('borrowers') or DEFAULT_BORROWERS,
lowcaseMatching=False)])
mibBuilder.setMibCompiler(
- compiler, kwargs.get('destination') or defaultDest
+ compiler, kwargs.get('destination') or DEFAULT_DEST
)