Skip to content

Commit

Permalink
micropub bug fix for Circle/Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Sep 24, 2022
1 parent c6ec1d8 commit 4012b46
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion micropub.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@


def remove_reserved(params):
return {k.removesuffix('[]'): v for k, v in params.items()
# this should really be k.removesuffix('[]'), but removesuffix is new in
# Python 3.9, and Circle is on 3.7 right now
return {k.rstrip('[]'): v for k, v in params.items()
if k not in RESERVED_PARAMS and not k.startswith(RESERVED_PREFIX)}


Expand Down

0 comments on commit 4012b46

Please sign in to comment.