Skip to content

Commit

Permalink
Catch KeyError in non-SPM projects
Browse files Browse the repository at this point in the history
  • Loading branch information
JanNash committed Nov 26, 2020
1 parent 46efb8f commit c6e1d74
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions xUnique.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,12 @@ def __unique_project(self, project_hex):
bcl_hex = self.root_node['buildConfigurationList']
self.__unique_build_configuration_list(project_hex, bcl_hex)

package_references_list = self.root_node['packageReferences']
for package_reference_hex in package_references_list:
self.__unique_package_reference(project_hex, package_reference_hex)
try:
package_references_list = self.root_node['packageReferences']
for package_reference_hex in package_references_list:
self.__unique_package_reference(project_hex, package_reference_hex)
except KeyError:
pass

subprojects_list = self.root_node.get('projectReferences')
if subprojects_list:
Expand Down

0 comments on commit c6e1d74

Please sign in to comment.