mirror of
https://github.com/9001/copyparty.git
synced 2025-11-03 13:33:13 +00:00
pkgres: fix tiny leak in template loader
This commit is contained in:
@@ -93,7 +93,8 @@ if not hasattr(socket, "AF_UNIX"):
|
|||||||
|
|
||||||
|
|
||||||
def load_jinja2_resource(E: EnvParams, name: str):
|
def load_jinja2_resource(E: EnvParams, name: str):
|
||||||
return load_resource(E, "web/" + name, "r").read()
|
with load_resource(E, "web/" + name, "r") as f:
|
||||||
|
return f.read()
|
||||||
|
|
||||||
|
|
||||||
class HttpSrv(object):
|
class HttpSrv(object):
|
||||||
|
|||||||
Reference in New Issue
Block a user