From 0137c2a74b7e800c72d1eb013b855534fef15b34 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 31 Jul 2020 22:05:24 +0530 Subject: [PATCH] Make dir if it does not exist --- setup/translations.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup/translations.py b/setup/translations.py index 8528112613..12b5670aae 100644 --- a/setup/translations.py +++ b/setup/translations.py @@ -113,6 +113,10 @@ class POT(Command): # {{{ ans.append('') pot = self.pot_header() + '\n\n' + '\n'.join(ans) dest = self.j(self.TRANSLATIONS, 'iso_639', 'iso_639_3.pot') + try: + os.makedirs(os.path.dirname(dest)) + except OSError: + pass with open(dest, 'wb') as f: f.write(pot.encode('utf-8')) self.upload_pot(resource='iso639')