aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/msgproto.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2024-11-13 14:24:03 -0500
committerKevin O'Connor <kevin@koconnor.net>2024-11-13 14:24:03 -0500
commitc88ee84bed69f2903c7499b380043957b325e28b (patch)
tree170c9160f88b7995ac743d162861118ba3556fe4 /klippy/msgproto.py
parent38bf6f2693816be08df43fac722dbcfea21238bc (diff)
downloadkutter-c88ee84bed69f2903c7499b380043957b325e28b.tar.gz
kutter-c88ee84bed69f2903c7499b380043957b325e28b.tar.xz
kutter-c88ee84bed69f2903c7499b380043957b325e28b.zip
msgproto: Fix return type for create_command()
Return an empty list instead of an emptry string if no command found. This improves compatibility within console.py on python3. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/msgproto.py')
-rw-r--r--klippy/msgproto.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/klippy/msgproto.py b/klippy/msgproto.py
index 0fe76593..25701df3 100644
--- a/klippy/msgproto.py
+++ b/klippy/msgproto.py
@@ -324,7 +324,7 @@ class MessageParser:
def create_command(self, msg):
parts = msg.strip().split()
if not parts:
- return ""
+ return []
msgname = parts[0]
mp = self.messages_by_name.get(msgname)
if mp is None: