diff options
author | Lorenz Diener <[email protected]> | 2022-11-24 22:11:53 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-11-24 22:11:53 +0200 |
commit | c3cfb197a6afaf441d452fa57cb1bbee211ca4b4 (patch) | |
tree | a7b459afb627a6a239019fe55cdcb034806b7f1a /mastodon | |
parent | 617c30a8c34c1d22bba974a76ae9a22032deb397 (diff) | |
parent | 649b6cabe0a324bce5b777e22d1acaeae2c87aaf (diff) | |
download | mastodon.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.py | 2 |
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: |