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