def init_database(self): database.init_database() info = DealerInfo.find(exchange=self.exchange) if not info: info = DealerInfo.new(self.exchange) else: print "WARNING, dealer %s already in database" % self.exchange info.rooms = 0 self.info = info
def init_database(self): database.init_database() info = DealerInfo.find(exchange = self.exchange) if not info: info = DealerInfo.new(self.exchange) else: print "WARNING, dealer %s already in database" % self.exchange info.rooms = 0 self.info = info