Skip to content

Commit

Permalink
Extra brackets
Browse files Browse the repository at this point in the history
Need to have brackets around equality checks to prevent the index of the array `string` to be out of range.
  • Loading branch information
RinkeHoekstra committed Nov 4, 2014
1 parent 0529f0d commit ed91bd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rdflib/plugins/parsers/pyRdfa/host/html5.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _format_test(string) :

# Now come the special cases:-(
# Check first for the duration stuff, that is the nastiest.
if len(string) > 2 and string[0] == 'P' or (string [0] == '-' and string[1] == 'P') :
if len(string) > 2 and (string[0] == 'P' or (string[0] == '-' and string[1] == 'P')) :
# this is meant to be a duration type
# first of all, get rid of the leading '-' and check again
if string[0] == '-' :
Expand Down

0 comments on commit ed91bd6

Please sign in to comment.