From 2977dad8ab74891398d40e76fd82895751e261b2 Mon Sep 17 00:00:00 2001 From: Christian Jacobs Date: Thu, 27 Mar 2014 10:12:58 +0000 Subject: [PATCH] Updated some comments. --- pyqso/callsign_lookup.py | 6 +++--- pyqso/record_dialog.py | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pyqso/callsign_lookup.py b/pyqso/callsign_lookup.py index 5ad71fc..9f0ccca 100644 --- a/pyqso/callsign_lookup.py +++ b/pyqso/callsign_lookup.py @@ -67,7 +67,7 @@ class CallsignLookup(): and return the data in the dictionary called fields_and_data. """ logging.debug("Performing a callsign lookup...") - # Remove any prefix or suffix from the callsign. + # Remove any prefix or suffix from the callsign before performing the lookup. logging.debug("Looking up callsign. The full callsign (with a prefix and/or suffix) is %s" % full_callsign) components = full_callsign.split("/") # We assume that prefixes or suffixes come before/after a forward slash character "/". suffixes = ["P", "M", "A", "PM", "MM", "AM", "QRP"] @@ -100,8 +100,8 @@ class CallsignLookup(): raise ValueError except ValueError: callsign = full_callsign - - + + # Commence lookup. fields_and_data = {"NAME":"", "ADDRESS":"", "STATE":"", "COUNTRY":"", "DXCC":"", "CQZ":"", "ITUZ":"", "IOTA":""} if(self.session_key): request = '/xml/current/?s=%s;callsign=%s' % (self.session_key, callsign) diff --git a/pyqso/record_dialog.py b/pyqso/record_dialog.py index 71b85f3..9be3637 100644 --- a/pyqso/record_dialog.py +++ b/pyqso/record_dialog.py @@ -488,8 +488,6 @@ class RecordDialog(Gtk.Dialog): connected = callsign_lookup.connect(username, password) if(connected): full_callsign = self.sources["CALL"].get_text() - - # Commence lookup. fields_and_data = callsign_lookup.lookup(full_callsign) for field_name in fields_and_data.keys(): self.sources[field_name].set_text(fields_and_data[field_name])