Skip to content

Commit

Permalink
Minor fixes to address @bsipocz's 2023-08-29 comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
msdemlei committed Oct 18, 2023
1 parent ce8c7e1 commit ac1366f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyvo/dal/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ def tables(self):
vosi.parse_tables(response.raw.read), tables_url)
return self._tables

def _parse_examples(self, examples_uri, /, depth=0):
def _parse_examples(self, examples_uri, *, depth=0):
"""returns the TAP queries from a DALI examples URI.
"""
if depth > 5:
raise Exception("Suspecting endless recursion when"
raise DALServiceError("Suspecting endless recursion when"
" parsing TAP examples")

response = self._session.get(examples_uri, stream=True)
Expand All @@ -177,7 +177,7 @@ def _parse_examples(self, examples_uri, /, depth=0):

for continuation in root.findall('.//*[@property="continuation"]'):
examples.extend(
self._parse_examples(continuation.get("href"), depth + 1))
self._parse_examples(continuation.get("href"), depth=depth + 1))

return examples

Expand Down

0 comments on commit ac1366f

Please sign in to comment.