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)
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