Commit 68b5ac30 authored by bee26's avatar bee26
Browse files

Merge branch 'cherry-pick-2fe56067' into 'release-20.4'

release-20.4:Backport!5451

See merge request !5457
parents 804916c3 d9c90db1
# ---------------------------------------------------------------------
# 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