Skip to content

Commit

Permalink
Fix TargetCollection directory check.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed Jul 23, 2024
1 parent f4a0203 commit 291723b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions law/target/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,8 @@ def __init__(self, *args, **kwargs):

# check that targets are in fact located in the same directory
for t in flatten_collections(self._flat_target_list):
if t.dirname != self.dir.path:
raise Exception("{} {} is not located in common directory {}".format(
t.__class__.__name__, t, self.dir))
if t.abs_dirname != self.dir.abspath:
raise Exception("{} is not located in common directory {}".format(t, self.dir))

def _repr_pairs(self):
expand = Config.instance().get_expanded_bool("target", "expand_path_repr")
Expand Down

0 comments on commit 291723b

Please sign in to comment.