Przeglądaj źródła

Don't walk in files and backups folder for translate and pyc removal

version-14
Anand Doshi 11 lat temu
rodzic
commit
31012e964a
2 zmienionych plików z 6 dodań i 0 usunięć
  1. +3
    -0
      webnotes/build.py
  2. +3
    -0
      webnotes/translate.py

+ 3
- 0
webnotes/build.py Wyświetl plik

@@ -55,6 +55,9 @@ def clear_pyc_files():
from webnotes.utils import get_base_path
for path, folders, files in os.walk(get_base_path()):
if 'locale' in folders: folders.remove('locale')
if 'files' in folders: folders.remove('files')
if 'backups' in folders: folders.remove('backups')
for f in files:
if f.decode("utf-8").endswith(".pyc"):
os.remove(os.path.join(path, f))


+ 3
- 0
webnotes/translate.py Wyświetl plik

@@ -309,6 +309,9 @@ def import_messages(lang, infile):
data = dict(get_all_messages_from_file(infile))
for (basepath, folders, files) in os.walk('.'):
if 'files' in folders: folders.remove('files')
if 'backups' in folders: folders.remove('backups')
def _update_lang_file(mtype):
"""create a langauge file for the given message type"""
messages = get_messages(basepath, mtype)


Ładowanie…
Anuluj
Zapisz