diff options
| author | Slávek Banko <slavek.banko@axis.cz> | 2023-01-19 02:48:19 +0100 |
|---|---|---|
| committer | Slávek Banko <slavek.banko@axis.cz> | 2023-01-19 02:48:19 +0100 |
| commit | 695b918fbb62eaf04924bd269dd7f010ccdcd26f (patch) | |
| tree | 099a9321e2aa515f5de746d73c337f31af825df5 /FusionIcon/interface.py | |
| parent | 92dc134f1b4cc4ad015858aba0d956205f6d1912 (diff) | |
| download | fusion-icon-695b918fbb62eaf04924bd269dd7f010ccdcd26f.tar.gz fusion-icon-695b918fbb62eaf04924bd269dd7f010ccdcd26f.zip | |
Drop python2 support.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'FusionIcon/interface.py')
| -rw-r--r-- | FusionIcon/interface.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/FusionIcon/interface.py b/FusionIcon/interface.py index 450a7f9..4fa375b 100644 --- a/FusionIcon/interface.py +++ b/FusionIcon/interface.py @@ -30,26 +30,26 @@ interfaces={ def import_interface(interface): try: if interface in interfaces: - print ' * Using the', interfaces[interface], 'Interface' + print(' * Using the', interfaces[interface], 'Interface') __import__('FusionIcon.interface_%s' %interface) else: - print ' *** Error: "%s" interface is invalid, this should not happen' %interface + print(' *** Error: "%s" interface is invalid, this should not happen' %interface) raise SystemExit - except ImportError, e: + except ImportError as e: if [i for i in interfaces if 'interface_%s' %i in str(e)]: - print ' * Interface not installed' + print(' * Interface not installed') else: - print ' *', e + print(' *', e) #doesn't work so remove it from the dict del interfaces[interface] if interfaces: - print ' ... Trying another interface' + print(' ... Trying another interface') choose_interface() else: - print ' *** Error: All interfaces failed, aborting!' + print(' *** Error: All interfaces failed, aborting!') raise SystemExit def choose_interface(try_first=None): @@ -61,7 +61,7 @@ def choose_interface(try_first=None): if try_first in interfaces: chosen_interface = try_first else: - raise SystemExit, ' *** Error: No such interface: %s' %try_first + raise SystemExit(' *** Error: No such interface: %s' %try_first) else: # gtk for everybody for now @@ -83,7 +83,7 @@ def choose_interface(try_first=None): # interfaces is empty else: - raise SystemExit, ' *** no available interfaces, this should not happen' + raise SystemExit(' *** no available interfaces, this should not happen') import_interface(chosen_interface) |
