Skip to content

Commit f0aae4b

Browse files
committed
python3: can't compare bytes and strings any more
1 parent be9a964 commit f0aae4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

astroquery/vizier/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ def _parse_result(self, response, get_catalog_names=False, verbose=False,
617617
table_list : `astroquery.utils.TableList` or str
618618
If there are errors in the parsing, then returns the raw results as a string.
619619
"""
620-
if response.content[:5] == '<?xml':
620+
if response.content[:5] == b'<?xml':
621621
try:
622622
return parse_vizier_votable(response.content, verbose=verbose,
623623
invalid=invalid,
@@ -629,9 +629,9 @@ def _parse_result(self, response, get_catalog_names=False, verbose=False,
629629
"in self.response, and the error in self.table_parse_error."
630630
" The attempted parsed result is in self.parsed_result.\n"
631631
"Exception: " + str(self.table_parse_error))
632-
elif response.content[:5] == '#\n# ':
632+
elif response.content[:5] == b'#\n# ':
633633
return parse_vizier_tsvfile(data, verbose=verbose)
634-
elif response.content[:6] == 'SIMPLE':
634+
elif response.content[:6] == b'SIMPLE':
635635
return fits.open(BytesIO(response.content), ignore_missing_end=True)
636636

637637
@property

0 commit comments

Comments
 (0)