brotherton-erpnext/patches/september_2013/p03_move_website_to_framework.py
2013-11-20 13:00:28 +05:30

17 lines
527 B
Python

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import get_base_path
import os, shutil
def execute():
# remove pyc files
utils_pyc = os.path.join(get_base_path(), "app", "selling", "utils.pyc")
if os.path.exists(utils_pyc):
os.remove(utils_pyc)
old_path = os.path.join(get_base_path(), "app", "website")
if os.path.exists(old_path):
shutil.rmtree(old_path)