File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 99
1010import pdal
1111
12- PDAL_DRIVERS_JSON = subprocess .run (["pdal" , "--drivers" , "--showjson" ], capture_output = True ).stdout
13- PDAL_DRIVERS = json .loads (PDAL_DRIVERS_JSON )
12+ try :
13+ PDAL_DRIVERS_JSON = subprocess .run (["pdal" , "--drivers" , "--showjson" ], capture_output = True ).stdout
14+ PDAL_DRIVERS = json .loads (PDAL_DRIVERS_JSON )
15+ _PDAL_VALIDATE = True
16+ except :
17+ PDAL_DRIVERS = []
18+ _PDAL_VALIDATE = False
1419
1520DEFAULT_STAGE_PARAMS = defaultdict (dict )
1621DEFAULT_STAGE_PARAMS .update ({
@@ -36,7 +41,7 @@ def pipeline(self):
3641 return output
3742
3843 def __getattr__ (self , name ):
39- if name not in dir (self ):
44+ if _PDAL_VALIDATE and ( name not in dir (self ) ):
4045 raise AttributeError (f"'{ self .prefix } .{ name } ' is an invalid or unsupported PDAL stage" )
4146 return partial (self .__class__ , self .prefix , type = name )
4247
You can’t perform that action at this time.
0 commit comments