Skip to content

Commit

Permalink
Fix issue in DictManager that would lead to incorrectly listed dicts. (
Browse files Browse the repository at this point in the history
…#203)

Fix issue in DictManager that would lead to incorrectly listed dicts.

The regex was matching files that included the suffix, but did not
necessarily *end* with the given suffix.
  • Loading branch information
csadorf committed Jul 3, 2019
1 parent 030720c commit 01fc155
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ next
----

- Keep signac shell command history on a per-project basis.
- Fix issue with incorrect detection of dict-like files managed with the ``DictManager`` class (e.g. ``job.stores``) (#203).

[1.1.0] -- 2019-05-19
---------------------
Expand Down
2 changes: 1 addition & 1 deletion signac/core/dict_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def __delattr__(self, name):

def __iter__(self):
for fn in os.listdir(self.prefix):
m = re.match('(.*){}'.format(self.suffix), fn)
m = re.match('^(.*){}$'.format(self.suffix), fn)
if m:
yield m.groups()[0]

Expand Down

0 comments on commit 01fc155

Please sign in to comment.