diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-02-04 16:17:22 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-02-04 16:17:22 +0100 |
commit | 52cf3751b2fe74aa5029f4b605b91aa84d9cf914 (patch) | |
tree | 30c636bb7ced6549e0aa4c9c46ae5aa8748f5a10 /module/web/pyload | |
parent | better DLC Support for Python 2.5 and 2.6 (diff) | |
download | pyload-52cf3751b2fe74aa5029f4b605b91aa84d9cf914.tar.xz |
little fixes, closed #71
Diffstat (limited to 'module/web/pyload')
-rw-r--r-- | module/web/pyload/views.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py index 37470c98f..9d3b6dd29 100644 --- a/module/web/pyload/views.py +++ b/module/web/pyload/views.py @@ -148,7 +148,10 @@ def logs(request, page=0): log = file(join(settings.LOG_ROOT, "log.txt")).readlines() data = [] page = int(page) - for i in range(page, page + 20): - data.append({'line': i + 1, 'content':log[i]}) + try: + for i in range(page, page + 20): + data.append({'line': i + 1, 'content':log[i]}) + except: + pass return render_to_response(join(settings.TEMPLATE, 'logs.html'), RequestContext(request, {'log': data, 'next': str(page + 20), 'prev': 0 if page-20 < 0 else page-20}, [status_proc])) |