OXIESEC PANEL
- Current Dir:
/
/
snap
/
core20
/
2599
/
usr
/
share
/
subiquity
/
subiquitycore
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/26/2025 10:13:33 PM
rwxr-xr-x
📄
__init__.py
710 bytes
04/20/2020 02:31:39 PM
rw-r--r--
📁
__pycache__
-
05/26/2025 10:13:33 PM
rwxr-xr-x
📄
async_helpers.py
2.27 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
context.py
4.31 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
controller.py
4.52 KB
04/20/2020 02:31:39 PM
rw-r--r--
📁
controllers
-
05/26/2025 10:13:33 PM
rwxr-xr-x
📄
controllerset.py
1.85 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
core.py
16.35 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
file_util.py
832 bytes
04/20/2020 02:31:39 PM
rw-r--r--
📄
gettext38.py
26.92 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
i18n.py
1.74 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
log.py
1.48 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
lsb_release.py
734 bytes
04/20/2020 02:31:39 PM
rw-r--r--
📁
models
-
05/26/2025 10:13:33 PM
rwxr-xr-x
📄
netplan.py
5.34 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
palette.py
4.53 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
prober.py
2 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
screen.py
4.9 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
signals.py
1.97 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
snapd.py
5.79 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
ssh.py
2.99 KB
04/20/2020 02:31:39 PM
rw-r--r--
📁
testing
-
05/26/2025 10:13:33 PM
rwxr-xr-x
📁
tests
-
05/26/2025 10:13:33 PM
rwxr-xr-x
📁
ui
-
05/26/2025 10:13:33 PM
rwxr-xr-x
📄
utils.py
5.24 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
view.py
3.35 KB
04/20/2020 02:31:39 PM
rw-r--r--
Editing: controllerset.py
Close
# Copyright 2020 Canonical, Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. class ControllerSet: def __init__(self, controllers_mod, names, init_args=()): self.controllers_mod = controllers_mod self.controller_names = names[:] self.init_args = init_args self.index = -1 self.instances = [] def _get_controller_class(self, name): cls_name = name+"Controller" return getattr(self.controllers_mod, cls_name) def load(self, name): self.controller_names.remove(name) klass = self._get_controller_class(name) if hasattr(self, name): c = 1 for instance in self.instances: if isinstance(instance, klass): c += 1 rep_cls = self._get_controller_class("Repeated") inst = rep_cls(getattr(self, name), c) name = inst.name else: inst = klass(*self.init_args) setattr(self, name, inst) self.instances.append(inst) def load_all(self): while self.controller_names: self.load(self.controller_names[0]) @property def cur(self): if self.out_of_bounds(): return None return self.instances[self.index] def out_of_bounds(self): return self.index < 0 or self.index >= len(self.instances)