diff --git a/python/CHANGELOG.md b/python/CHANGELOG.md index be5870c80f..8100c9af77 100644 --- a/python/CHANGELOG.md +++ b/python/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.12.4] - 2021-09-07 +[0.12.4]: https://github.com/trezor/trezor-firmware/compare/python/v0.12.3...python/v0.12.4 + +### Fixed + +- trezorctl: fixed "Invalid value for " when using Click 8 and param is not specified [#1798] + ## [0.12.3] - 2021-07-29 [0.12.3]: https://github.com/trezor/trezor-firmware/compare/python/v0.12.2...python/v0.12.3 @@ -507,3 +514,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#1296]: https://github.com/trezor/trezor-firmware/issues/1296 [#1363]: https://github.com/trezor/trezor-firmware/issues/1363 [#1738]: https://github.com/trezor/trezor-firmware/issues/1738 +[#1798]: https://github.com/trezor/trezor-firmware/issues/1798 diff --git a/python/src/trezorlib/cli/__init__.py b/python/src/trezorlib/cli/__init__.py index 622081f478..11dedce7ec 100644 --- a/python/src/trezorlib/cli/__init__.py +++ b/python/src/trezorlib/cli/__init__.py @@ -32,6 +32,8 @@ class ChoiceType(click.Choice): self.typemap = typemap def convert(self, value, param, ctx): + if value in self.typemap.values(): + return value value = super().convert(value, param, ctx) return self.typemap[value]