django-split-settings
django-split-settings copied to clipboard
Fix/507
sorry @sobolevn I've realized one thing.
Getting list of paths matching a non-existent pattern, returns empty list, which differs from getting a paths of parent folder (empty string).
>>> import glob
>>> glob.glob('/tmp/None') # Previous behavior
[]
>>> glob.glob('/tmp/') # Current behavior
['/tmp/']
This adds a skip to Optional empty values (+unit-test & docs)
Hey @sobolevn, I rebased the PR to make latest change more visible.
If it's unclear, without skipping Optional values the code will result to IsADirectoryError as you can see when commenting out the change and running pytest
> with open(included_file, 'rb') as to_compile:
E IsADirectoryError: [Errno 21] Is a directory: './tests/settings/merged'
split_settings/tools.py:107: IsADirectoryError
@sobolevn any update on this one?