Skip to content

Commit

Permalink
Fix for python 2.7 os.makedirs
Browse files Browse the repository at this point in the history
  • Loading branch information
akharit committed Jul 20, 2018
1 parent d468a96 commit d10168c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion azure/datalake/store/multithread.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ def touch(self, src, dst):
for empty_directory in self.client._adlfs._empty_dirs_to_add():
local_rel_rpath = str(AzureDLPath(self.rpath).trim().globless_prefix)
path = os.path.join(self.lpath, os.path.relpath(empty_directory['name'], local_rel_rpath))
os.makedirs(path, exist_ok=True)
try:
os.makedirs(path)
except OSError as e:
if e.errno != errno.EEXIST:
raise
self.client.run(nthreads, monitor, before_start=touch)

def active(self):
Expand Down

0 comments on commit d10168c

Please sign in to comment.