mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 06:58:42 +00:00
[Web] Fix peers tab failing to set flag location
The request.country returns bytes not a string so decode.
This commit is contained in:
parent
b8b044f451
commit
a34543100c
2 changed files with 10 additions and 3 deletions
|
@ -1,5 +1,11 @@
|
|||
# Changelog
|
||||
|
||||
## 2.0.3 (WiP)
|
||||
|
||||
### Web UI
|
||||
|
||||
- Fix TypeError in Peers Tab setting country flag.
|
||||
|
||||
## 2.0.2 (2019-06-08)
|
||||
|
||||
### Packaging
|
||||
|
|
|
@ -202,7 +202,8 @@ class Flag(resource.Resource):
|
|||
return self
|
||||
|
||||
def render(self, request):
|
||||
path = ('ui', 'data', 'pixmaps', 'flags', request.country.lower() + '.png')
|
||||
flag = request.country.decode('utf-8').lower() + '.png'
|
||||
path = ('ui', 'data', 'pixmaps', 'flags', flag)
|
||||
filename = common.resource_filename('deluge', os.path.join(*path))
|
||||
if os.path.exists(filename):
|
||||
request.setHeader(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue