Rev 3222, Use eval in bench for older pytyhon compatibility, Remove unnecessary print from chart archive
This commit is contained in:
parent
f5846853b3
commit
0c6c7d2725
3 changed files with 2 additions and 3 deletions
|
@ -104,7 +104,6 @@ class ChartDb(Db):
|
||||||
num_archived = 0
|
num_archived = 0
|
||||||
cur = self.getCursor()
|
cur = self.getCursor()
|
||||||
for row in res:
|
for row in res:
|
||||||
print dict(row)
|
|
||||||
if row["num"] == 1:
|
if row["num"] == 1:
|
||||||
continue
|
continue
|
||||||
cur.execute("INSERT INTO data ?", {
|
cur.execute("INSERT INTO data ?", {
|
||||||
|
|
|
@ -10,7 +10,7 @@ class Config(object):
|
||||||
|
|
||||||
def __init__(self, argv):
|
def __init__(self, argv):
|
||||||
self.version = "0.6.1"
|
self.version = "0.6.1"
|
||||||
self.rev = 3221
|
self.rev = 3222
|
||||||
self.argv = argv
|
self.argv = argv
|
||||||
self.action = None
|
self.action = None
|
||||||
self.config_file = "zeronet.conf"
|
self.config_file = "zeronet.conf"
|
||||||
|
|
|
@ -642,7 +642,7 @@ class UiRequest(object):
|
||||||
main = sys.modules["main"]
|
main = sys.modules["main"]
|
||||||
s = time.time()
|
s = time.time()
|
||||||
if init:
|
if init:
|
||||||
exec(init, globals(), locals())
|
eval(compile(init, '<string>', 'exec'), globals(), locals())
|
||||||
for _ in range(times):
|
for _ in range(times):
|
||||||
back = eval(code, globals(), locals())
|
back = eval(code, globals(), locals())
|
||||||
return ["%s run: %.3fs" % (times, time.time() - s), back]
|
return ["%s run: %.3fs" % (times, time.time() - s), back]
|
||||||
|
|
Loading…
Reference in a new issue