diff options
| author | Barry Warsaw | 2007-07-17 23:28:21 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2007-07-17 23:28:21 -0400 |
| commit | 012fcb71e7e634b985219a7d5cf0deda87a2aa90 (patch) | |
| tree | 0fbc8d80d5d235c29c63e03f48c8bbbe3d04700e | |
| parent | 8d0c0a003d5cdb23a87674e1f411e9515513b17c (diff) | |
| download | mailman-012fcb71e7e634b985219a7d5cf0deda87a2aa90.tar.gz mailman-012fcb71e7e634b985219a7d5cf0deda87a2aa90.tar.zst mailman-012fcb71e7e634b985219a7d5cf0deda87a2aa90.zip | |
| -rw-r--r-- | setup.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -40,8 +40,12 @@ for dirpath, dirnames, filenames in os.walk(start_dir): for filename in filenames: po_file = os.path.join(dirpath, filename) basename, ext = os.path.splitext(po_file) + if ext <> '.po': + continue mo_file = basename + '.mo' - if ext == '.po' and not os.path.exists(mo_file): + if (not os.path.exists(mo_file) or + os.path.getmtime(po_file) > os.path.getmtime(mo_file)): + # The mo file doesn't exist or is older than the po file. os.system('bin/msgfmt.py -o %s %s' % (mo_file, po_file)) |
