Ejemplo n.º 1
0
 def version_tag(value):
     '''function to avoid argparse error message override'''
     from biicode.common.model.version_tag import VersionTag
     try:
         return VersionTag.loads(value)
     except ValueError as e:
         raise BiiException(str(e))
Ejemplo n.º 2
0
 def policies_line_parser(line):
     try:
         pattern, path = line.split(":")
         pattern = pattern.strip()
         tag = VersionTag.loads(path.strip())
         result.append(Rule(pattern, tag))
     except:
         raise BiiException("Incorrect rule in policies.bii: %s" % line)
Ejemplo n.º 3
0
 def policies_line_parser(line):
     try:
         pattern, path = line.split(":")
         pattern = pattern.strip()
         tag = VersionTag.loads(path.strip())
         result.append(Rule(pattern, tag))
     except:
         raise BiiException("Incorrect rule in policies.bii: %s" % line)