unverbuggt / mkdocs-encryptcontent-plugin

A MkDocs plugin that encrypt/decrypt markdown content with AES
https://unverbuggt.github.io/mkdocs-encryptcontent-plugin/
MIT License
123 stars 15 forks source link

TypeError: unsupported operand type(s) for |: 'dict' and 'dict' #41

Closed Mara-Li closed 1 year ago

Mara-Li commented 1 year ago

In python 3.8, build come with error :

File "/opt/buildhome/python3.8/lib/python3.8/site-packages/encryptcontent/plugin.py", line 243, in on_config
self.config['encrypted_something'] = self.config['inject'] | self.config['encrypted_something'] #add inject to encrypted_something
TypeError: unsupported operand type(s) for |: 'dict' and 'dict'
unverbuggt commented 1 year ago

I'll add a workaround for older Python versions. https://stackoverflow.com/questions/38987/how-do-i-merge-two-dictionaries-in-a-single-expression

Mara-Li commented 1 year ago

Thanks!