mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 22:50:26 +00:00
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:
parent
68045cc60c
commit
0e2cd063c5
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user