From 9fbc83fe9deb360c8b352222bfbd5550562dc717 Mon Sep 17 00:00:00 2001 From: Miroslav Kovar Date: Fri, 20 Sep 2019 19:29:41 +0200 Subject: [PATCH] Always handle claim_name as a string --- lbry/lbry/extras/cli.py | 2 +- lbry/tests/unit/test_cli.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lbry/lbry/extras/cli.py b/lbry/lbry/extras/cli.py index 602ce30a6..13a28cc6a 100644 --- a/lbry/lbry/extras/cli.py +++ b/lbry/lbry/extras/cli.py @@ -45,7 +45,7 @@ async def execute_command(conf, method, params, callback=display): def normalize_value(x, key=None): if not isinstance(x, str): return x - if key in ('uri', 'channel_name', 'name', 'file_name', 'download_directory'): + if key in ('uri', 'channel_name', 'name', 'file_name', 'claim_name', 'download_directory'): return x if x.lower() == 'true': return True diff --git a/lbry/tests/unit/test_cli.py b/lbry/tests/unit/test_cli.py index 208e08403..ed0670288 100644 --- a/lbry/tests/unit/test_cli.py +++ b/lbry/tests/unit/test_cli.py @@ -51,6 +51,7 @@ class CLITest(AsyncioTestCase): self.assertEqual('3', normalize_value('3', key="name")) self.assertEqual('3', normalize_value('3', key="download_directory")) self.assertEqual('3', normalize_value('3', key="channel_name")) + self.assertEqual('3', normalize_value('3', key="claim_name")) self.assertEqual(3, normalize_value('3', key="some_other_thing"))