mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 19:44:52 +00:00
set the server to always run in debug mode if 'dev' is in the version
This commit is contained in:
parent
0ac8e39dda
commit
999803fce5
1 changed files with 9 additions and 1 deletions
|
@ -373,7 +373,15 @@ class TopLevel(resource.Resource):
|
|||
return resource.Resource.getChild(self, path, request)
|
||||
|
||||
def render(self, request):
|
||||
if request.args.get('debug', ['false'])[-1] == 'true':
|
||||
debug = 'dev' in common.get_version()
|
||||
if 'debug' in request.args:
|
||||
debug_arg = request.args.get('debug')[-1]
|
||||
if debug_arg == 'true':
|
||||
debug = True
|
||||
elif debug_arg == 'false':
|
||||
debug = False
|
||||
|
||||
if debug:
|
||||
scripts = self.debug_scripts[:]
|
||||
else:
|
||||
scripts = self.scripts[:]
|
||||
|
|
Loading…
Add table
Reference in a new issue