use f-strings and correct log message, as the icon is shaddowed

This commit is contained in:
Andreas P 2021-10-23 15:48:48 +02:00
parent 59f625bd8f
commit 25952c8751

View File

@ -192,10 +192,10 @@ class UiIcons(metaclass=Singleton):
else: else:
setattr(self, key, qta.icon(icon)) setattr(self, key, qta.icon(icon))
except Exception: except Exception:
log.exception('Unexpected error for icon: {icon}'.format(icon=icon)) log.exception(f'Unexpected error for icon: {icon}')
setattr(self, key, qta.icon('fa.exclamation-circle', color='red')) setattr(self, key, qta.icon('fa.exclamation-circle', color='red'))
except Exception: except Exception:
log.exception('Unexpected error for icon: {icon}'.format(icon=icon)) log.exception(f'Unexpected error for icon with key: {key}')
setattr(self, key, qta.icon('fa.exclamation-circle', color='red')) setattr(self, key, qta.icon('fa.exclamation-circle', color='red'))
@staticmethod @staticmethod