build.plat: avoid type confusion in _check_feature.

Before this commit, `_check_feature(valid_xdrs=0)` would mean that
XDR buffers are not supported. Only `_check_feature(valid_xdrs=())`
was intended to be an indicator of that.
This commit is contained in:
whitequark 2020-10-15 08:54:48 +00:00
parent 69ed4918b8
commit d22b2c5604

View file

@ -177,7 +177,7 @@ class Platform(ResourceManager, metaclass=ABCMeta):
.format(type(self).__name__))
def _check_feature(self, feature, pin, attrs, valid_xdrs, valid_attrs):
if not valid_xdrs:
if len(valid_xdrs) == 0:
raise NotImplementedError("Platform '{}' does not support {}"
.format(type(self).__name__, feature))
elif pin.xdr not in valid_xdrs: