| Conditions | 4 |
| Total Lines | 12 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 1 |
| CRAP Score | 15.664 |
| Changes | 0 | ||
| 1 | # coding: utf-8 |
||
| 27 | 1 | def find_project_dir(): |
|
| 28 | """Determine the project base dir, by searching a stakkr.yml file""" |
||
| 29 | path = getcwd() |
||
| 30 | while True: |
||
| 31 | files = listdir(path) |
||
| 32 | if 'stakkr.yml' in files: |
||
| 33 | return path |
||
| 34 | |||
| 35 | new_path = dirname(path) |
||
| 36 | if new_path == path: |
||
| 37 | raise FileNotFoundError('Could not find config file (stakkr.yml)') |
||
| 38 | path = new_path |
||
| 39 |