MCPcopy Create free account
hub / github.com/Syncplay/syncplay / wrapper

Method wrapper

syncplay/client.py:959–968  ·  view source on GitHub ↗
(self, *args, **kwds)

Source from the content-addressed store, hash-verified

957 def requireServerFeatureDecorator(f):
958 @wraps(f)
959 def wrapper(self, *args, **kwds):
960 if self.serverVersion == "0.0.0":
961 self.ui.showDebugMessage(
962 "Tried to check server version too soon (testing support for: {})".format(featureRequired))
963 return None
964 if featureRequired not in self.serverFeatures or not self.serverFeatures[featureRequired]:
965 featureName = getMessage("feature-{}".format(featureRequired))
966 self.ui.showErrorMessage(getMessage("not-supported-by-server-error").format(featureName))
967 return
968 return f(self, *args, **kwds)
969 return wrapper
970 return requireServerFeatureDecorator
971

Callers

nothing calls this directly

Calls 3

getMessageFunction · 0.90
showDebugMessageMethod · 0.45
showErrorMessageMethod · 0.45

Tested by

no test coverage detected