Esempio n. 1
0
    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
Esempio n. 2
0
	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