diff --git a/webnotes/install_lib/install.py b/webnotes/install_lib/install.py index 2a35874345..a788941418 100755 --- a/webnotes/install_lib/install.py +++ b/webnotes/install_lib/install.py @@ -77,13 +77,15 @@ class Installer: return target def install_app(self): + sync_for("lib", force=True, sync_everything=True) + self.import_core_docs() + try: from startup import install except ImportError, e: print "No app install found" + return - sync_for("lib", force=True, sync_everything=True) - self.import_core_docs() install.pre_import() sync_for("app", force=True, sync_everything=True) @@ -156,4 +158,4 @@ class Installer: webnotes.conn.sql("""create table __Auth ( `user` VARCHAR(180) NOT NULL PRIMARY KEY, `password` VARCHAR(180) NOT NULL - ) ENGINE=InnoDB DEFAULT CHARSET=utf8""") \ No newline at end of file + ) ENGINE=InnoDB DEFAULT CHARSET=utf8""") diff --git a/webnotes/install_lib/setup_public_folder.py b/webnotes/install_lib/setup_public_folder.py index 09899650f2..feef4fa664 100644 --- a/webnotes/install_lib/setup_public_folder.py +++ b/webnotes/install_lib/setup_public_folder.py @@ -29,9 +29,7 @@ def make(): ] for link in symlinks: - if not os.path.exists(link[0]): + if not os.path.exists(link[0]) and os.path.exists(link[1]): os.symlink(link[1], link[0]) - os.chdir("..") - - \ No newline at end of file + os.chdir('..') diff --git a/webnotes/translate.py b/webnotes/translate.py index f898a49834..ef51304d82 100644 --- a/webnotes/translate.py +++ b/webnotes/translate.py @@ -56,12 +56,14 @@ def update_translations(): message_updated = False status_file_path = "app/.wnf-lang-status" + if not os.path.exists(os.path.join('app', 'translations')): + return if os.path.exists(status_file_path): with open(status_file_path, "r") as langstatusfile: langstatus = eval(langstatusfile.read()) for lang in languages: - filename = 'app/translations/'+lang+'.csv' + filename = os.path.join('app', 'translations', lang + '.csv') if langstatus.get(lang, None)!=os.path.getmtime(filename): print "Setting up lang files for " + lang + "..." if not message_updated: diff --git a/webnotes/webutils.py b/webnotes/webutils.py index 21ffa983bf..907cd34fc2 100644 --- a/webnotes/webutils.py +++ b/webnotes/webutils.py @@ -5,7 +5,6 @@ from __future__ import unicode_literals import os import conf -from startup.webutils import * import webnotes import webnotes.utils @@ -145,7 +144,11 @@ def prepare_args(page_name): if not args: return False - update_template_args(page_name, args) + try: + from startup.webutils import update_template_args + update_template_args(page_name, args) + except ImportError: + pass return args