File tree Expand file tree Collapse file tree 2 files changed +21
-10
lines changed Expand file tree Collapse file tree 2 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -26,18 +26,24 @@ def get_valid_build_systems(working_dir, package=None):
2626 List of class: Valid build system class types.
2727 """
2828 from rez .plugin_managers import plugin_manager
29+ from rez .exceptions import PackageMetadataError
2930
30- package = package or get_developer_package (working_dir )
31+ try :
32+ package = package or get_developer_package (working_dir )
33+ except PackageMetadataError :
34+ # no package, or bad package
35+ pass
3136
32- if getattr (package , "build_command" , None ) is not None :
33- buildsys_name = "custom"
34- else :
35- buildsys_name = getattr (package , "build_system" , None )
37+ if package :
38+ if getattr (package , "build_command" , None ) is not None :
39+ buildsys_name = "custom"
40+ else :
41+ buildsys_name = getattr (package , "build_system" , None )
3642
37- # package explicitly specifies build system
38- if buildsys_name :
39- cls = plugin_manager .get_plugin_class ('build_system' , buildsys_name )
40- return [cls ]
43+ # package explicitly specifies build system
44+ if buildsys_name :
45+ cls = plugin_manager .get_plugin_class ('build_system' , buildsys_name )
46+ return [cls ]
4147
4248 # detect valid build systems
4349 clss = []
Original file line number Diff line number Diff line change 1313
1414def get_current_developer_package ():
1515 from rez .packages_ import get_developer_package
16+ from rez .exceptions import PackageMetadataError
1617
1718 global _package
1819
1920 if _package is None :
20- _package = get_developer_package (os .getcwd ())
21+ try :
22+ _package = get_developer_package (os .getcwd ())
23+ except PackageMetadataError :
24+ # no package, or bad package
25+ pass
2126
2227 return _package
2328
You can’t perform that action at this time.
0 commit comments