Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __setsource(value):
global ptype
if all(hasattr(value, method) for method in ('seek','store','consume')) or isinstance(value, provider.base):
ptype.source = value
return
raise ValueError("Invalid source object")
source = field.set('default-source', __getsource, __setsource, 'Default source to load/commit data from/to')
def __getsource():
return ptype.source
def __setsource(value):