mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-12 01:08:17 +03:00
Move classname to Utility.py
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -35,6 +35,7 @@ __all__ = [
|
||||
'Protocol',
|
||||
'callRateLimited',
|
||||
'callOnceOnly',
|
||||
'classname',
|
||||
'isValidIPAddress',
|
||||
'parseHostPort',
|
||||
'runExternalCommand',
|
||||
@@ -121,6 +122,10 @@ def callOnceOnly(func):
|
||||
return wrapper
|
||||
|
||||
|
||||
def classname(ob) -> str:
|
||||
return ob.__class__.__name__
|
||||
|
||||
|
||||
@functools.lru_cache(None)
|
||||
def isValidIPAddress(address) -> bool:
|
||||
try:
|
||||
|
||||
@@ -281,9 +281,6 @@ class ImportQRCodeOnTheScreenAction(Mixins.CleanupOnExit, AppQAction):
|
||||
except Exception as ex:
|
||||
# Any non-exit exceptions
|
||||
|
||||
def classname(ob) -> str:
|
||||
return ob.__class__.__name__
|
||||
|
||||
logger.error(f'\'{classname(self)}\' is not supported on this platform')
|
||||
|
||||
self.sct = None
|
||||
|
||||
@@ -218,9 +218,6 @@ class SubscriptionManager(WebGETManager):
|
||||
except Exception as ex:
|
||||
# Any non-exit exceptions
|
||||
|
||||
def classname(ob) -> str:
|
||||
return ob.__class__.__name__
|
||||
|
||||
logger.error(f'parse share link from \'{webURL}\' failed: {ex}')
|
||||
|
||||
failureArgs.append({'error': classname(ex), **kwargs})
|
||||
@@ -314,9 +311,6 @@ class TestPingLatencyWorker(QtCore.QObject, QtCore.QRunnable):
|
||||
except Exception as ex:
|
||||
# Any non-exit exceptions
|
||||
|
||||
def classname(ob) -> str:
|
||||
return ob.__class__.__name__
|
||||
|
||||
self.factory.setExtras('delayResult', classname(ex))
|
||||
|
||||
# Extra guard
|
||||
@@ -367,9 +361,6 @@ class TestTcpingLatencyWorker(QtCore.QObject, QtCore.QRunnable):
|
||||
except Exception as ex:
|
||||
# Any non-exit exceptions
|
||||
|
||||
def classname(ob) -> str:
|
||||
return ob.__class__.__name__
|
||||
|
||||
self.factory.setExtras('delayResult', classname(ex))
|
||||
|
||||
# Extra guard
|
||||
|
||||
Reference in New Issue
Block a user