示例#1
0
 def execute(self):
     config = self.cli("show running-config")
     if "System locked by other session" in config:
         raise CLIOperationError("System locked by other session!")
     config = self.strip_first_lines(config, 3)
     return self.cleaned_config(config)
示例#2
0
 def cleaned_config(self, config):
     if "System locked by other session!" in config:
         raise CLIOperationError("System locked by other session!")
     config = super(Profile, self).cleaned_config(config)
     return config