Skip to content

Commit

Permalink
fix CSW request byte handling (#776)
Browse files Browse the repository at this point in the history
* fix CSW request byte handling

* fix
  • Loading branch information
tomkralidis committed May 10, 2021
1 parent 9da00e9 commit 68c73b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion owslib/catalogue/csw2.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def getrecords2(self, constraints=[], sortby=None, typenames='csw:Record', esn='
"""

if xml is not None:
if str(xml).startswith('<'):
if xml.startswith(b'<'):
self.request = etree.fromstring(xml)
val = self.request.find(util.nspath_eval('csw:Query/csw:ElementSetName', namespaces))
if val is not None:
Expand Down
2 changes: 1 addition & 1 deletion owslib/catalogue/csw3.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def getrecords(self, constraints=[], sortby=None, typenames='csw30:Record', esn=
"""

if xml is not None:
if str(xml).startswith('<'):
if xml.startswith(b'<'):
self.request = etree.fromstring(xml)
val = self.request.find(util.nspath_eval('csw30:Query/csw30:ElementSetName', namespaces))
if val is not None:
Expand Down

0 comments on commit 68c73b3

Please sign in to comment.