summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
authorGravatar Gregy <gregy@gregy.cz> 2010-08-07 21:52:56 +0200
committerGravatar Gregy <gregy@gregy.cz> 2010-08-07 21:52:56 +0200
commit454ca224a8c4666a7b0541e3ab3af08c608fa9d3 (patch)
tree51a0308c6c3ccd4f4582c80e0be08e9b2a7648d3 /module/web
parentfile info prefetching (RapidshareCom UploadedTo), download folder fix, Serien... (diff)
downloadpyload-454ca224a8c4666a7b0541e3ab3af08c608fa9d3.tar.xz
Log doesn't crash on empty line
Diffstat (limited to 'module/web')
-rw-r--r--module/web/pyload/views.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py
index 2c58f021a..58d1991ae 100644
--- a/module/web/pyload/views.py
+++ b/module/web/pyload/views.py
@@ -221,9 +221,12 @@ def logs(request, item=-1):
counter = counter+1;
if counter >= item:
- date,time,level,message = l.split(" ", 3)
- dtime = datetime.strptime(date+' '+time, '%d.%m.%Y %H:%M:%S')
-
+ try:
+ date,time,level,message = l.split(" ", 3)
+ dtime = datetime.strptime(date+' '+time, '%d.%m.%Y %H:%M:%S')
+ except:
+ dtime = datetime.strptime('01.01.3333 12:12:12', '%d.%m.%Y %H:%M:%S')
+ message = l;
if item == -1 and fro <= dtime:
item = counter #found our datetime
if item >= 0: