Ticket #7050: 7916.diff

File 7916.diff, 1005 bytes (added by Marc Garcia, 15 years ago)

Patch 1 from duplicated ticket

  • core/management/commands/makemessages.py

     
    5959            os.unlink(potfile)
    6060
    6161        all_files = []
    62         for (dirpath, dirnames, filenames) in os.walk("."):
    63             all_files.extend([(dirpath, f) for f in filenames])
     62        for dir_content in os.listdir('.'):
     63            if os.path.isfile(dir_content):
     64                all_files.append(('.', dir_content))
     65            elif not os.path.isdir(os.path.join(dir_content, 'locale')) and not os.path.isdir(os.path.join(dir_content, 'conf', 'locale')):
     66                for (dirpath, dirnames, filenames) in os.walk(dir_content):
     67                    all_files.extend([(dirpath, f) for f in filenames])
    6468        all_files.sort()
    6569        for dirpath, file in all_files:
    6670            if domain == 'djangojs' and file.endswith('.js'):
Back to Top