This commit is contained in:
parent
ec7e38b1e4
commit
680ac6ca6e
3 changed files with 5 additions and 4 deletions
|
|
@ -210,7 +210,9 @@ def create_folder(path):
|
|||
|
||||
def set_user(username):
|
||||
from frappe.utils.user import User
|
||||
local.session["user"] = username
|
||||
local.session.user = username
|
||||
local.session.sid = username
|
||||
local.session.data = {}
|
||||
local.user = User(username)
|
||||
local.restrictions = None
|
||||
local.user_perms = {}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ def get_bootinfo():
|
|||
get_user(bootinfo)
|
||||
|
||||
# system info
|
||||
bootinfo['control_panel'] = frappe.get_doc('Control Panel')
|
||||
bootinfo['control_panel'] = frappe.get_doc('Control Panel').as_dict()
|
||||
bootinfo['sysdefaults'] = frappe.defaults.get_defaults()
|
||||
bootinfo['server_date'] = frappe.utils.nowdate()
|
||||
bootinfo["send_print_in_body_and_attachment"] = frappe.db.get_value("Outgoing Email Settings",
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ def run(fn, args):
|
|||
if args.get("profile") and fn!="serve":
|
||||
pr.disable()
|
||||
s = StringIO.StringIO()
|
||||
sortby = 'cumulative'
|
||||
ps = pstats.Stats(pr, stream=s).sort_stats(sortby)
|
||||
ps = pstats.Stats(pr, stream=s).sort_stats('tottime', 'ncalls')
|
||||
ps.print_stats()
|
||||
print s.getvalue()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue