fix: Dont create __init__.py in prod

closes https://github.com/frappe/frappe/issues/16618
This commit is contained in:
Ankush Menat 2023-01-06 13:31:32 +05:30
parent 010aa4636a
commit 6bae5a2974

View file

@ -109,7 +109,7 @@ def get_pages_from_path(start, app, app_path):
if os.path.exists(start_path):
for basepath, folders, files in os.walk(start_path):
# add missing __init__.py
if not "__init__.py" in files:
if not "__init__.py" in files and frappe.conf.get("developer_mode"):
open(os.path.join(basepath, "__init__.py"), "a").close()
for fname in files: