Skip to content

Commit

Permalink
refactor: remove code for Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
dbohdan committed Sep 15, 2020
1 parent ab727c2 commit f951875
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions remarshal.py
Expand Up @@ -78,20 +78,6 @@ def timestamp_constructor(loader, node):
)


# Construct YAML strs as Unicode in Python 2.
# We are shamelessly using an exception for flow control here.
try:
unicode

for loader in loaders:
loader.add_constructor(
u'tag:yaml.org,2002:str',
lambda self, node: self.construct_scalar(node)
)
except NameError:
pass


# === JSON ===

if hasattr(json, 'JSONDecodeError'):
Expand Down

0 comments on commit f951875

Please sign in to comment.