-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
420 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ | |
|
||
# Usage | ||
|
||
|
||
def getUsage(): | ||
return "\ | ||
Command-line SNMP tools version %s, written by Ilya Etingof <[email protected]>\n\ | ||
|
@@ -42,14 +43,15 @@ def getUsage(): | |
-V software release information\n\ | ||
-d dump raw packets\n\ | ||
-D category enable debugging [%s]\n\ | ||
" % ( pysnmpAppsVersion, | ||
pysmiVersion, | ||
pysnmpVersion, | ||
pysnmpMibsVersion, | ||
pyasn1Version, | ||
sys.version.replace('\n', ''), | ||
debug and ','.join(debug.flagMap.keys()) or "") | ||
" % (pysnmpAppsVersion, | ||
pysmiVersion, | ||
pysnmpVersion, | ||
pysnmpMibsVersion, | ||
pyasn1Version, | ||
sys.version.replace('\n', ''), | ||
debug and ','.join(debug.flagMap.keys()) or "") | ||
|
||
|
||
# Scanner | ||
|
||
class MainScannerMixIn: | ||
|
@@ -71,13 +73,14 @@ def t_debug(self, s): | |
|
||
# Parser | ||
|
||
|
||
class MainParserMixIn: | ||
initialSymbol = 'Cmdline' | ||
|
||
def error(self, token): | ||
raise error.PySnmpError( | ||
'Command-line parser error at token %s\n' % token | ||
) | ||
) | ||
|
||
def p_cmdline(self, args): | ||
''' | ||
|
@@ -104,9 +107,10 @@ def p_cmdlineExt(self, args): | |
Debug ::= debug string | ||
Debug ::= debug whitespace string | ||
''' | ||
|
||
# Generator | ||
|
||
|
||
class __MainGenerator(base.GeneratorTemplate): | ||
# SNMPv1/v2 | ||
def n_VersionInfo(self, cbCtx, node): | ||
|
@@ -127,6 +131,7 @@ def n_Debug(self, cbCtx, node): | |
f = node[1].attr | ||
debug.setLogger(debug.Debug(*f.split(','))) | ||
|
||
|
||
def generator(cbCtx, ast): | ||
snmpEngine, ctx = cbCtx | ||
ctx['mibViewController'] = view.MibViewController( | ||
|
Oops, something went wrong.