Skip to content

Commit 5ee8f72

Browse files
committed
raise in AttributeError instead of an AssertionError when accessing an invalid stage
1 parent f161adc commit 5ee8f72

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pdal/pio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def pipeline(self):
3838
return output
3939

4040
def __getattr__(self, name):
41-
assert name in dir(self), "Invalid or unsupported stage"
41+
if name not in dir(self):
42+
raise AttributeError(f"'{self.prefix}.{name}' is an invalid or unsupported PDAL stage")
4243
return partial(self.__class__, self.prefix, type=name)
4344

4445
def __str__(self):

0 commit comments

Comments
 (0)