Skip to content

Commit 923d473

Browse files
authored
Revert "Fix past.translation on read-only file systems"
1 parent ab9acdb commit 923d473

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/past/translation/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,9 @@ def load_module(self, fullname):
402402
code = compile(source, self.pathname, 'exec')
403403

404404
dirname = os.path.dirname(cachename)
405+
if not os.path.exists(dirname):
406+
os.makedirs(dirname)
405407
try:
406-
if not os.path.exists(dirname):
407-
os.makedirs(dirname)
408408
with open(cachename, 'wb') as f:
409409
data = marshal.dumps(code)
410410
f.write(data)

0 commit comments

Comments
 (0)