diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2021-01-10 10:37:25 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2021-01-10 10:37:25 (GMT) |
| commit | a6eab3e7ffcd9f6530c54931bbba3e0f108e0dd3 (patch) | |
| tree | 81b9816302fa403d8ffd4fbb5399a811612f7ef5 /wasp/apps | |
| parent | ed242b84a6e70aff344669559c038348c822413a (diff) | |
system: Allows apps to be registered using strings
Use instance tests to identify strings and substitute then for an
instanciated class.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/apps')
| -rw-r--r-- | wasp/apps/software.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/wasp/apps/software.py b/wasp/apps/software.py index 2c7869c..a39cce0 100644 --- a/wasp/apps/software.py +++ b/wasp/apps/software.py @@ -63,8 +63,7 @@ class SoftwareApp(): if checkbox.touch(event): label = checkbox.label.replace(' ', '') if checkbox.state: - exec('import apps.{}'.format(module)) - exec('wasp.system.register(apps.{}.{}App())'.format(module, label)) + wasp.system.register('apps.{}.{}App'.format(module, label)) else: for app in wasp.system.launcher_ring: if type(app).__name__.startswith(label): |
