Do not compare with invalid profile

This commit is contained in:
Nicolas Évrard committed 2011-06-01 18:48:08 +02:00
1 parent 58e98bf496
commit 253d97a9da
1 file changed
+2
+2
View File
@@ -526,6 +526,8 @@ class DBLogin(object):
host, port = host_entry.split(':', 1) if ':' in host_entry else ('', '')
database = self.entry_database.get_text().strip()
for idx, profile_info in enumerate(self.profile_store):
if not profile_info[1]:
continue
profile = profile_info[0]
if (host == self.profiles.get(profile, 'host')
and port == self.profiles.get(profile, 'port')