PY3 fixes and added tests for gluon/admin.py
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user