Permalink
Browse files

Make makedirs and makedirs_p return self instead of None

Unless the directory already exists in the case of makedirs_p, then it
still returns None
  • Loading branch information...
1 parent 4bb8efb commit d6a3a2c025b8c1b145adda6e3b677b921f03de0f @xentac xentac committed Nov 13, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 path.py
View
3 path.py
@@ -913,10 +913,11 @@ def mkdir_p(self, mode=0777):
def makedirs(self, mode=0777):
os.makedirs(self, mode)
+ return self
def makedirs_p(self, mode=0777):
try:
- self.makedirs(mode)
+ return self.makedirs(mode)
except OSError, e:
if e.errno != errno.EEXIST:
raise

0 comments on commit d6a3a2c

Please sign in to comment.