remove python 2, deprecated af

This commit is contained in:
mcbloch 2019-08-31 00:50:01 +02:00
parent 0538c9f984
commit ffa11a6a87
No known key found for this signature in database
GPG key ID: CE32A7D95B7D6418

View file

@ -30,10 +30,7 @@ class User(db.Model):
return False return False
def get_id(self): def get_id(self):
try: return str(self.id)
return unicode(self.id) # python 2
except NameError:
return str(self.id) # python 3
def __repr__(self): def __repr__(self):
return '%s' % self.username return '%s' % self.username