From 19be574f89050ad75ff49c8220c8556d6ec96a4b Mon Sep 17 00:00:00 2001 From: dragon-gt <31092936+dragon-gt@users.noreply.github.com> Date: Tue, 9 Aug 2022 20:13:47 +0800 Subject: [PATCH] fix setTVChannel #71 --- LGTV/__init__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/LGTV/__init__.py b/LGTV/__init__.py index af630fe..8893800 100644 --- a/LGTV/__init__.py +++ b/LGTV/__init__.py @@ -55,15 +55,14 @@ def parseargs(command, argv): argv[i] = True elif argv[i].lower() == "false": argv[i] = False - try: + elif argv[i].isnumeric(): f = int(argv[i]) argv[i] = f + try: + f = float(argv[i]) + argv[i] = f except: - try: - f = float(argv[i]) - argv[i] = f - except: - pass + pass output[a] = argv[i] return output