diff --git a/Furious/Widget/UserServersQTableWidget.py b/Furious/Widget/UserServersQTableWidget.py index 3631d8f1..9fc7681d 100644 --- a/Furious/Widget/UserServersQTableWidget.py +++ b/Furious/Widget/UserServersQTableWidget.py @@ -1201,9 +1201,19 @@ class UserServersQTableWidget(QTranslatable, AppQTableWidget): # Nothing selected. Do nothing return + def toURI(factory) -> str: + assert isinstance(factory, ConfigurationFactory) + + try: + return factory.toURI() + except Exception: + # Any non-exit exceptions + + return '' + # TODO: MessageBox? QApplication.clipboard().setText( - '\n'.join(list(AS_UserServers()[index].toURI() for index in indexes)) + '\n'.join(list(toURI(AS_UserServers()[index]) for index in indexes)) ) def exportSelectedItemQR(self): diff --git a/Furious/Window/QRCodeWindow.py b/Furious/Window/QRCodeWindow.py index 321ca39f..0fb94929 100644 --- a/Furious/Window/QRCodeWindow.py +++ b/Furious/Window/QRCodeWindow.py @@ -57,7 +57,12 @@ class QRCodeWindow(SupportImplicitReference, AppQMainWindow): config = AS_UserServers()[index] - uri = config.toURI() + try: + uri = config.toURI() + except Exception: + # Any non-exit exceptions + + uri = '' if uri: qrcode = pyqrcode.create(uri)