Skip to content

Commit

Permalink
Fixed code merge issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Apr 3, 2024
1 parent 0f5c573 commit cf98a2f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pysmi/scripts/mibcopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This file is part of pysmi software.
#
# Copyright (c) 2015-2019, Ilya Etingof <[email protected]>
# Copyright (c) 2015-2020, Ilya Etingof <[email protected]>
# License: https://www.pysnmp.com/pysmi/license.html
#
# SNMP SMI/MIB copying tool
Expand Down
14 changes: 12 additions & 2 deletions pysmi/scripts/mibdump.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This file is part of pysmi software.
#
# Copyright (c) 2015-2019, Ilya Etingof <[email protected]>
# Copyright (c) 2015-2020, Ilya Etingof <[email protected]>
# License: https://www.pysnmp.com/pysmi/license.html
#
# SNMP SMI/MIB data management tool
Expand Down Expand Up @@ -42,6 +42,7 @@ def start():
mibStubs = []
mibBorrowers = []
dstFormat = None
dstTemplate = None
dstDirectory = None
cacheDirectory = ""
nodepsFlag = False
Expand All @@ -66,6 +67,7 @@ def start():
[--mib-stub=<MIB-NAME>]
[--mib-borrower=<PATH>]
[--destination-format=<FORMAT>]
[--destination-template=<PATH>]
[--destination-directory=<DIRECTORY>]
[--cache-directory=<DIRECTORY>]
[--disable-fuzzy-source]
Expand All @@ -85,7 +87,9 @@ def start():
Use @mib@ placeholder token in URI to refer directly to
the required MIB module when source does not support
directory listing (e.g. HTTP).
FORMAT - pysnmp, json, null"""
FORMAT - pysnmp, json, null
TEMPLATE - path to a Jinja2 template extending the base one (see
documentation for details)"""

try:
opts, inputMibs = getopt.getopt(
Expand All @@ -102,6 +106,7 @@ def start():
"mib-stub=",
"mib-borrower=",
"destination-format=",
"destination-template=",
"destination-directory=",
"cache-directory=",
"no-dependencies",
Expand Down Expand Up @@ -176,6 +181,9 @@ def start():
if opt[0] == "--destination-format":
dstFormat = opt[1]

if opt[0] == "--destination-template":
dstTemplate = opt[1]

if opt[0] == "--destination-directory":
dstDirectory = opt[1]

Expand Down Expand Up @@ -380,6 +388,7 @@ def start():
MIBs excluded from code generation: {', '.join(sorted(mibStubs))}
MIBs to compile: {', '.join(inputMibs)}
Destination format: {dstFormat}
Custom destination template: {dstTemplate}
Parser grammar cache directory: {cacheDirectory or "not used"}
Also compile all relevant MIBs: {"no" if nodepsFlag else "yes"}
Rebuild MIBs regardless of age: {"yes" if rebuildFlag else "no"}
Expand Down Expand Up @@ -415,6 +424,7 @@ def start():
noDeps=nodepsFlag,
rebuild=rebuildFlag,
dryRun=dryrunFlag,
dstTemplate=dstTemplate,
genTexts=genMibTextsFlag,
textFilter=keepTextsLayout and (lambda symbol, text: text) or None,
writeMibs=writeMibsFlag,
Expand Down

0 comments on commit cf98a2f

Please sign in to comment.