check if app in apps.txt before installing

This commit is contained in:
Pratik Vyas 2014-04-24 12:47:54 +05:30
parent 8a93003e65
commit c797648f91

View file

@ -89,6 +89,9 @@ def install_app(name, verbose=False, set_as_patched=True):
app_hooks = frappe.get_hooks(app_name=name)
installed_apps = frappe.get_installed_apps()
if name not in frappe.get_all_apps(with_frappe=True):
raise Exception("App not in apps.txt")
if name in installed_apps:
print "App Already Installed"
frappe.msgprint(_("App Already Installed"))