PY3 fixes and added tests for gluon/admin.py

This commit is contained in:
ilvalle
2016-06-24 22:54:56 +02:00
parent 48350664f0
commit 8aecaf4514
19 changed files with 75 additions and 69 deletions
+3 -4
View File
@@ -1,6 +1,5 @@
import os
import sys
import cStringIO
import gluon.contrib.shell
import gluon.dal
import gluon.html
@@ -122,7 +121,7 @@ def execute():
output = web_debugger.do_exec(command)
if output is None:
output = ""
except Exception, e:
except Exception as e:
output = T("Exception %s") % str(e)
k = len(session['debug_commands:' + app]) - 1
return '[%i] %s%s\n' % (k + 1, command, output)
@@ -212,7 +211,7 @@ def toggle_breakpoint():
ok = True
else:
response.flash = T("Unable to determine the line number!")
except Exception, e:
except Exception as e:
session.flash = str(e)
return response.json({'ok': ok, 'lineno': lineno})
@@ -233,6 +232,6 @@ def list_breakpoints():
if filename == bp_filename:
breakpoints.append(bp_lineno)
ok = True
except Exception, e:
except Exception as e:
session.flash = str(e)
return response.json({'ok': ok, 'breakpoints': breakpoints})