Skip to content

Commit

Permalink
Allow python --replace on files in the current directory
Browse files Browse the repository at this point in the history
Fixes #686
  • Loading branch information
bitwiseman committed May 27, 2015
1 parent 7a1ce5b commit 1dba737
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/jsbeautifier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,8 @@ def handle_eof(self, current_token):

def mkdir_p(path):
try:
os.makedirs(path)
if path:
os.makedirs(path)
except OSError as exc: # Python >2.5
if exc.errno == errno.EEXIST and os.path.isdir(path):
pass
Expand Down

0 comments on commit 1dba737

Please sign in to comment.