remove unused code
This commit is contained in:
parent
a58959997f
commit
d5d5163a65
1 changed files with 1 additions and 13 deletions
|
@ -881,20 +881,8 @@ class UiRequest(object):
|
||||||
return [b"No error! :)"]
|
return [b"No error! :)"]
|
||||||
|
|
||||||
# Just raise an error to get console
|
# Just raise an error to get console
|
||||||
|
# Is this even useful anymore?
|
||||||
def actionConsole(self):
|
def actionConsole(self):
|
||||||
import sys
|
|
||||||
sites = self.server.sites
|
|
||||||
main = sys.modules["main"]
|
|
||||||
|
|
||||||
def bench(code, times=100, init=None):
|
|
||||||
sites = self.server.sites
|
|
||||||
main = sys.modules["main"]
|
|
||||||
s = time.time()
|
|
||||||
if init:
|
|
||||||
eval(compile(init, '<string>', 'exec'), globals(), locals())
|
|
||||||
for _ in range(times):
|
|
||||||
back = eval(code, globals(), locals())
|
|
||||||
return ["%s run: %.3fs" % (times, time.time() - s), back]
|
|
||||||
raise Exception("Here is your console")
|
raise Exception("Here is your console")
|
||||||
|
|
||||||
# - Tests -
|
# - Tests -
|
||||||
|
|
Loading…
Reference in a new issue