Remove python v2 remnant

As vermin [0] confirms, the codebase has long moved beyond supporting
python v2 (which is not a bad thing). This removes the last explicit py2
piece of code.

And in case anyone wonders, vermin currently reports the minium version
to be v3.6.

[0] https://pypi.org/project/vermin/
This commit is contained in:
corubba 2022-05-07 21:14:48 +02:00
parent 68045cc60c
commit 0e2cd063c5

View File

@ -83,10 +83,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 '<User {0}>'.format(self.username) return '<User {0}>'.format(self.username)