Skip to content

Commit

Permalink
Merge pull request #506 from msdemlei/unbreak-untyped-interfaces
Browse files Browse the repository at this point in the history
Make registry.Interface construction work with no standard_id.
  • Loading branch information
bsipocz authored Dec 15, 2023
2 parents 3c8c67f + d24891a commit e9d2558
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyvo/registry/regtap.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,15 @@ class Interface:
def __init__(self, access_url, standard_id, intf_type, intf_role):
self.access_url = access_url
self.standard_id = standard_id or None
self.is_vosi = standard_id.startswith("ivo://ivoa.net/std/vosi")
self.type = intf_type or None
self.role = intf_role or None
self.is_standard = self.role == "std"

if self.standard_id is not None:
self.is_vosi = self.standard_id.startswith("ivo://ivoa.net/std/vosi")
else:
self.is_vosi = False

def __repr__(self):
return (f"Interface({self.access_url!r}, {self.standard_id!r},"
f" {self.type!r}, {self.role!r})")
Expand Down

0 comments on commit e9d2558

Please sign in to comment.