Skip to content

Commit

Permalink
Fix nexus test
Browse files Browse the repository at this point in the history
  • Loading branch information
kif committed Apr 28, 2021
1 parent 6745a46 commit 2695096
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fabio/nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
__contact__ = "[email protected]"
__license__ = "MIT"
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
__date__ = "23/04/2021"
__date__ = "28/04/2021"
__status__ = "production"
__docformat__ = 'restructuredtext'

Expand Down Expand Up @@ -83,10 +83,10 @@ def from_isotime(text, use_tz=False):
if len(text) == 1:
# just in case someone sets as a list
text = text[0]
try:
text = text.decode("ascii")
except (UnicodeError, AttributeError):
text = str(text)
if isinstance(text, bytes):
text = text.decode()
if len(text) > 3 and text.startswith("b") and text[1] == text[-1] and text[1] in ('"', "'"):
text = text[2:-1]
if len(text) < 19:
logger.warning("Not a iso-time string: %s", text)
return
Expand Down

0 comments on commit 2695096

Please sign in to comment.