Commit 0e1f6a7c authored by Dmitry Lukhtionov's avatar Dmitry Lukhtionov
Browse files

Fix SKS.SKS.get_config script

parent 5c46d1c3
Pipeline #32155 passed with stages
in 15 minutes and 55 seconds
# ---------------------------------------------------------------------
# SKS.SKS.get_config
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# Copyright (C) 2007-2021 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
......@@ -17,7 +17,10 @@ class Script(BaseScript):
def execute_cli(self, policy="r"):
assert policy in ("r", "s")
if policy == "s":
config = self.cli("show startup-config")
try:
config = self.cli("show startup-config")
except self.CLISyntaxError:
config = self.cli("show configuration")
else:
config = self.cli("show running-config")
try:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment