mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 09:54:49 -04:00
Python 3: Convert some unicode/bytes uses (#3569)
This commit is contained in:
parent
c4842e16cb
commit
da7785147d
17 changed files with 122 additions and 67 deletions
|
@ -137,7 +137,7 @@ class DomainSpecificString(
|
|||
@classmethod
|
||||
def from_string(cls, s):
|
||||
"""Parse the string given by 's' into a structure object."""
|
||||
if len(s) < 1 or s[0] != cls.SIGIL:
|
||||
if len(s) < 1 or s[0:1] != cls.SIGIL:
|
||||
raise SynapseError(400, "Expected %s string to start with '%s'" % (
|
||||
cls.__name__, cls.SIGIL,
|
||||
))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue