# HG changeset patch # User Ludovic Chabant # Date 1518549149 28800 # Node ID 3678cddf99f902963b7a9efedc36736e2adfd7b5 # Parent 292e3a1316d81551c3ce42d344a3bd181e9115e9 sources: Improve error message when trying to get children pages on a group. diff -r 292e3a1316d8 -r 3678cddf99f9 piecrust/sources/fs.py --- a/piecrust/sources/fs.py Tue Feb 13 11:11:48 2018 -0800 +++ b/piecrust/sources/fs.py Tue Feb 13 11:12:29 2018 -0800 @@ -163,7 +163,10 @@ # If we want the children items of an item, we look for # a directory that has the same name as the item's file. if item.is_group: - raise ValueError() + raise ValueError( + "'%s' is a content group and doesn't have a logical " + "child. Did you call `family.children` on a group? " + "You need to check `is_group` first.") dir_path, _ = os.path.splitext(item.spec) if os.path.isdir(dir_path): metadata = self._createGroupMetadata(dir_path)