Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self):
self.maxrepeats = 3
cmd2.Cmd.__init__(self)
def __init__(self, verbose=False):
Cmd.__init__(self)
self.pp = pprint.PrettyPrinter(indent=4)
self.connect()
# by default readline thinks - and other characters are word delimiters :(
if readline:
readline.set_completer_delims(re.sub('[-~]', '', readline.get_completer_delims()))
path = os.path.join(os.environ.get('HOME', ''), HISTORY_FILE)
self.history_file = os.path.abspath(path)
else:
self.history_file = None
self.tables = []
self.table = None
self.client = kwargs['client']
self.client.console = self
del kwargs['client']
self._cmds = {}
self._aliases = {}
atexit.register(self.save_histfile)
readline.set_history_length(self.histsize)
if os.path.exists('cmdhistory'):
if self.histsize != 0:
readline.read_history_file('cmdhistory')
else:
os.remove('cmdhistory')
cmd2.Cmd.__init__(self, *args, **kwargs)
def __init__(self):
Cmd.__init__(self)
logging.basicConfig(filename='/tmp/darkdashboard.log', level=logging.INFO,\
format='%(asctime)s:%(name)s:%(levelname)s:%(message)s')
self.logger = logging.getLogger("darkdashboard")
self.prompt = 'dark> '
self.rdb = redis_connection()
print(self.bold(self.colorize('Welcome to DarkServer Dashboard', 'blue')))
def __init__(self, dataplane: Data):
self.prompt = "[cli@vsdnagent]# "
self.links = links
self.nodes = nodes
Cmd.__init__(self, use_ipython = False)
def __init__(self, router = None, smppcm = None, *args, **kwargs):
Cmd.__init__(self, *args, **kwargs)
# Init connections to router and smppcm
self.router = router
self.smppcm = smppcm
# Remove settable parameters
Cmd.settable = StubbornDict()
def __init__(self):
Lobotomy.__init__(self)
def __init__(self, device_id, get_stub):
Cmd.__init__(self)
self.get_stub = get_stub
self.device_id = device_id
self.prompt = '(' + self.colorize(
self.colorize('omci {}'.format(device_id), 'green'),
'bold') + ') '
def __init__(self):
cmd2.Cmd.__init__(self)
self.prompt="->> "