mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 14:40:27 +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
|
||||
|
||||
def get_id(self):
|
||||
try:
|
||||
return unicode(self.id) # python 2
|
||||
except NameError:
|
||||
return str(self.id) # python 3
|
||||
return str(self.id)
|
||||
|
||||
def __repr__(self):
|
||||
return '<User {0}>'.format(self.username)
|
||||
|
Loading…
Reference in New Issue
Block a user