use CapResources for radios
This commit is contained in:
parent
3751653874
commit
7098e44d9b
8 changed files with 60 additions and 49 deletions
|
|
@ -137,13 +137,18 @@ class ReplApplication(Cmd, ConsoleApplication):
|
|||
def interactive(self):
|
||||
return self._interactive
|
||||
|
||||
def change_path(self, path):
|
||||
def _change_prompt(self):
|
||||
path = self.working_path.tostring()
|
||||
if len(path) > 0 and path != '/':
|
||||
self.prompt = '%s:%s> ' % (self.APPNAME, path)
|
||||
else:
|
||||
self.prompt = '%s> ' % (self.APPNAME)
|
||||
self.objects = []
|
||||
|
||||
def change_path(self, path):
|
||||
self.working_path.fromstring(path)
|
||||
self._change_prompt()
|
||||
|
||||
def add_object(self, obj):
|
||||
self.objects.append(obj)
|
||||
|
||||
|
|
@ -178,6 +183,14 @@ class ReplApplication(Cmd, ConsoleApplication):
|
|||
if obj:
|
||||
return obj
|
||||
|
||||
def unload_backends(self, *args, **kwargs):
|
||||
self.objects = []
|
||||
return ConsoleApplication.unload_backends(self, *args, **kwargs)
|
||||
|
||||
def load_backends(self, *args, **kwargs):
|
||||
self.objects = []
|
||||
return ConsoleApplication.load_backends(self, *args, **kwargs)
|
||||
|
||||
def main(self, argv):
|
||||
cmd_args = argv[1:]
|
||||
if cmd_args:
|
||||
|
|
@ -810,7 +823,7 @@ class ReplApplication(Cmd, ConsoleApplication):
|
|||
return 1
|
||||
|
||||
self.objects = objects
|
||||
self.change_path(self.working_path.tostring())
|
||||
self._change_prompt()
|
||||
|
||||
def _fetch_objects(self):
|
||||
objects = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue