Exemplo n.º 1
0
Arquivo: user.py Projeto: sporsh/bite
 def __init__(self, user):
     BiteObject.__init__(self)
     match = re.match(r'([^<]*)<([^>]*)>', user)
     if match is None:
         raise Exception("Invalid format of user: %r" % user)
     name, email = match.groups()
     self.name = name.strip()
     self.email = email.strip()
Exemplo n.º 2
0
Arquivo: date.py Projeto: sporsh/bite
 def __init__(self, date):
     BiteObject.__init__(self)
     if not date:
         self.date = time.gmtime()
     elif isinstance(date, basestring):
         self.date = time.strptime(date)
     else:
         raise Exception("Could not create date from %r" % date)
Exemplo n.º 3
0
Arquivo: issue.py Projeto: sporsh/bite
 def __init__(self, user, date, title, fields):
     """
     :param fields: is a dictionary with field_name=update_object
     """
     BiteObject.__init__(self)
     self.user = user
     self.date = date
     self.title = title
     for field, value in fields.iteritems():
         assert isinstance(value, basestring), "%r must be obj_id string" % field
     self.fields = fields
Exemplo n.º 4
0
 def __init__(self, user, date, message):
     BiteObject.__init__(self)
     self.user = user
     self.date = date
     assert isinstance(message, basestring), "message must be string"
     self.message = message
Exemplo n.º 5
0
 def __init__(self, user, date, fields):
     BiteObject.__init__(self)
     self.user = user
     self.date = date
     self.fields = fields