From: Marcin Koziej Date: Wed, 4 Apr 2012 09:27:08 +0000 (+0200) Subject: fix X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/f64dd827284e17ba584d7970a2e3d44f8b8ad981?ds=inline fix --- diff --git a/apps/wolnelektury_core/management/commands/localepack.py b/apps/wolnelektury_core/management/commands/localepack.py index 12413a31b..e5362fe7a 100644 --- a/apps/wolnelektury_core/management/commands/localepack.py +++ b/apps/wolnelektury_core/management/commands/localepack.py @@ -45,9 +45,12 @@ class AppLocale(Locale): def save(self, output_directory, languages): for lc in languages: lc = lc[0] + out = os.path.join(output_directory, lc, self.name + '.po') if os.path.exists(os.path.join(self.path, 'locale', lc)): + if not os.path.exists(os.path.dirname(out)): + os.makedirs(os.path.dirname(dir)) shutil.copy2(os.path.join(self.path, 'locale', lc, 'LC_MESSAGES', 'django.po'), - os.path.join(output_directory, lc, self.name + '.po')) + out) def load(self, input_directory, languages): for lc in zip(*languages)[0]: