From 2115ee3e7102146fea78419e37cf993582005a15 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 18 Mar 2015 14:54:23 +0530 Subject: [PATCH] minor fixes --- frappe/__init__.py | 2 -- frappe/commands.py | 6 +++++- frappe/templates/pages/me.py | 3 --- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/frappe/__init__.py b/frappe/__init__.py index 67fda8b335..1e5b7a1602 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -926,8 +926,6 @@ def attach_print(doctype, name, file_name=None): "fcontent": scrub_urls(get_print(doctype, name)).encode("utf-8") } - print print_settings, out - local.flags.ignore_print_permissions = False return out diff --git a/frappe/commands.py b/frappe/commands.py index d40a420c14..a6f8bb02a3 100644 --- a/frappe/commands.py +++ b/frappe/commands.py @@ -134,9 +134,13 @@ def reinstall(context): frappe.clear_cache() except: installed = [] + raise finally: - frappe.db.close() + if frappe.db: + frappe.db.close() + frappe.destroy() + frappe.init(site=site) _new_site(frappe.conf.db_name, site, verbose=context.verbose, force=True, reinstall=True, install_apps=installed) @click.command('install-app') diff --git a/frappe/templates/pages/me.py b/frappe/templates/pages/me.py index 95ee9a2f0b..b1dbf86a2f 100644 --- a/frappe/templates/pages/me.py +++ b/frappe/templates/pages/me.py @@ -16,14 +16,11 @@ def get_context(context): context["my_account_list"] = [] for element in frappe.get_hooks("my_account_context"): - print element if isinstance(element, dict): context["my_account_list"].append(element) else: frappe.get_attr(element)(context) - print context["my_account_list"] - info = get_fullname_and_avatar(frappe.session.user) context["fullname"] = info.fullname context["user_image"] = info.avatar