Sfoglia il codice sorgente

Fix syntax error on Python 2.4

Mike Naberezny 10 anni fa
parent
commit
68a4c3f60f
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      supervisor/web.py

+ 6 - 1
supervisor/web.py

@@ -189,8 +189,13 @@ class TailView(MeldView):
         else:
             processname = form['processname']
             offset = 0
+
             limit = form.get('limit', '1024')
-            limit = min(-1024, int(limit)*-1 if limit.isdigit() else -1024)
+            if limit.isdigit():
+                limit = min(-1024, int(limit)*-1)
+            else:
+                limit = -1024
+
             if not processname:
                 tail = 'No process name found'
             else: