Refactor prototype-functionality into its own package

This commit is contained in:
Griatch 2018-06-06 19:15:20 +02:00
parent 01acdccd6d
commit 054cba42bf
9 changed files with 1978 additions and 1752 deletions

View file

@ -647,6 +647,22 @@ def check_lockstring(self, accessing_obj, lockstring, no_superuser_bypass=False,
default=default, access_type=access_type)
def validate_lockstring(lockstring):
"""
Validate so lockstring is on a valid form.
Args:
lockstring (str): Lockstring to validate.
Returns:
is_valid (bool): If the lockstring is valid or not.
error (str or None): A string describing the error, or None
if no error was found.
"""
return _LOCK_HANDLER.valdate(lockstring)
def _test():
# testing