Commit 2fe56067 authored by bee26's avatar bee26
Browse files

Merge branch 'sks_config' into 'master'

Fix SKS.SKS.get_config script

See merge request !5451
parents a3f4922d 0e1f6a7c
Pipeline #32183 passed with stages
in 57 minutes and 52 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