mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
remove miscellaneous PY2 code
This commit is contained in:
parent
e6027562e2
commit
d4676910c9
6 changed files with 24 additions and 67 deletions
|
@ -15,11 +15,9 @@
|
|||
# limitations under the License.
|
||||
|
||||
import logging
|
||||
from sys import intern
|
||||
from typing import Callable, Dict, Optional
|
||||
|
||||
import six
|
||||
from six.moves import intern
|
||||
|
||||
import attr
|
||||
from prometheus_client.core import Gauge
|
||||
|
||||
|
@ -154,9 +152,6 @@ def intern_string(string):
|
|||
return None
|
||||
|
||||
try:
|
||||
if six.PY2:
|
||||
string = string.encode("ascii")
|
||||
|
||||
return intern(string)
|
||||
except UnicodeEncodeError:
|
||||
return string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue