# HG changeset patch # User Ludovic Chabant # Date 1571940937 25200 # Node ID ae0fb567f4594a7913b99e72497d227c66c873d7 # Parent 949c4f536f269f6c67d77917f6c96901289a49a6 Report error but don't crash when a solution points to a missing project. diff -r 949c4f536f26 -r ae0fb567f459 scripts/vsutil.py --- a/scripts/vsutil.py Thu Oct 24 11:14:39 2019 -0700 +++ b/scripts/vsutil.py Thu Oct 24 11:15:37 2019 -0700 @@ -281,7 +281,14 @@ abspath = self.abspath logger.debug(f"Loading project {self.name} ({self.path}) from: {abspath}") - tree = etree.parse(abspath) + try: + tree = etree.parse(abspath) + except (FileNotFoundError, OSError) as ex: + logger.debug(f"Error loading project {self.name}: " + str(ex)) + self._itemgroups = {} + self._propgroups= {} + return + root = tree.getroot() if _strip_ns(root.tag) != 'Project': raise Exception(f"Expected root node 'Project', got '{root.tag}'")