mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 20:14:13 +00:00
fix exception if no country is specified
This commit is contained in:
parent
dadb74477e
commit
604ddc092e
@ -532,7 +532,7 @@ class Flag(resource.Resource):
|
|||||||
path = ("data", "pixmaps", "flags", request.country.lower() + ".png")
|
path = ("data", "pixmaps", "flags", request.country.lower() + ".png")
|
||||||
filename = pkg_resources.resource_filename("deluge",
|
filename = pkg_resources.resource_filename("deluge",
|
||||||
os.path.join(*path))
|
os.path.join(*path))
|
||||||
if filename:
|
if os.path.exists(filename):
|
||||||
request.setHeader("cache-control", "public, must-revalidate, max-age=86400")
|
request.setHeader("cache-control", "public, must-revalidate, max-age=86400")
|
||||||
request.setHeader("content-type", "image/png")
|
request.setHeader("content-type", "image/png")
|
||||||
data = open(filename, "rb")
|
data = open(filename, "rb")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user