aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2022-11-24 22:11:53 +0200
committerGitHub <[email protected]>2022-11-24 22:11:53 +0200
commitc3cfb197a6afaf441d452fa57cb1bbee211ca4b4 (patch)
treea7b459afb627a6a239019fe55cdcb034806b7f1a /mastodon
parent617c30a8c34c1d22bba974a76ae9a22032deb397 (diff)
parent649b6cabe0a324bce5b777e22d1acaeae2c87aaf (diff)
downloadmastodon.py-c3cfb197a6afaf441d452fa57cb1bbee211ca4b4.tar.gz
Merge pull request #278 from adbenitez/adbenitez/fix-bug-in-json_date_parse
fix NameError: name 'x' is not defined in __json_date_parse()
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index e7ec143..bb2d9d8 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -3564,7 +3564,7 @@ class Mastodon:
3564 else: 3564 else:
3565 json_object[k] = dateutil.parser.parse(v) 3565 json_object[k] = dateutil.parser.parse(v)
3566 except: 3566 except:
3567 if isinstance(v, str) and len(x.strip()) == 0: 3567 if isinstance(v, str) and len(v.strip()) == 0:
3568 # Pleroma bug workaround: Empty string becomes start of epoch 3568 # Pleroma bug workaround: Empty string becomes start of epoch
3569 json_object[k] = datetime.datetime.fromtimestamp(0) 3569 json_object[k] = datetime.datetime.fromtimestamp(0)
3570 else: 3570 else:
Powered by cgit v1.2.3 (git 2.41.0)