Mercurial > piecrust2
comparison piecrust/pathutil.py @ 1:aaa8fb7c8918
Re-arranged modules to reduce dependencies to builtin stuff.
Added `init` command.
| author | Ludovic Chabant <ludovic@chabant.com> |
|---|---|
| date | Sun, 22 Dec 2013 08:00:24 -0800 |
| parents | a212a3f2e3ee |
| children | 485682a6de50 |
comparison
equal
deleted
inserted
replaced
| 0:a212a3f2e3ee | 1:aaa8fb7c8918 |
|---|---|
| 15 if cwd is None: | 15 if cwd is None: |
| 16 cwd = os.getcwd() | 16 cwd = os.getcwd() |
| 17 | 17 |
| 18 while not os.path.isfile(os.path.join(cwd, '_content', 'config.yml')): | 18 while not os.path.isfile(os.path.join(cwd, '_content', 'config.yml')): |
| 19 cwd = os.path.dirname(cwd) | 19 cwd = os.path.dirname(cwd) |
| 20 if not cwd: | 20 if not cwd or cwd == '/': |
| 21 return None | 21 return None |
| 22 return cwd | 22 return cwd |
| 23 | 23 |
