def get(self, *args, **kwargs): ''' Bots come here and say hello ''' bot = PhoneBot.by_uuid(self.request.headers['Uuid']) if bot == None: bot = PhoneBot( uuid=self.request.headers['Uuid'].encode('utf-8', 'ignore')) self.dbsession.add(bot) self.dbsession.flush() self.write("Welcome to the horde") else: self.write("Pink evil robots") self.finish()