[chirp_devel] [PATCH 1 of 1] [ui] Correctly manage "No com port" situation
Marco Filippi IZ3GME
Tue Oct 1 06:55:23 PDT 2013
# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1380634041 -7200
# Node ID d6888d30045ccc062a8d1909f9c386f0a803420a
# Parent 23e2541b4dcde2e9d8be6282a8a0abc28a81a5e3
[ui] Correctly manage "No com port" situation
Fix regression introduced fixing #1131
diff --git a/chirpui/clone.py b/chirpui/clone.py
--- a/chirpui/clone.py
+++ b/chirpui/clone.py
@@ -56,6 +56,8 @@
port = conf.get("last_port")
elif ports:
port = ports[0]
+ else:
+ port = _("No ports detected")
if not port in ports:
ports.insert(0, port)
@@ -120,7 +122,7 @@
self.__table.set_col_spacings(10)
self.__row = 0
- self.__port = self.__make_port(settings and settings.port or ["No port detected"])
+ self.__port = self.__make_port(settings and settings.port or None)
self.__modl = self.__make_model()
self.__vend = self.__make_vendor(self.__modl)
@@ -184,7 +186,8 @@
return None
conf = config.get("state")
- conf.set("last_port", cs.port)
+ if cs.port != _("No ports detected"):
+ conf.set("last_port", cs.port)
conf.set("last_vendor", cs.radio_class.VENDOR)
conf.set("last_model", model)
More information about the chirp_devel
mailing list