Philipp Hörist pushed to branch master at gajim / gajim

Commits:
d8777a78 by Philipp Hörist at 2018-03-17T00:20:11+01:00
Fix deleting an account that was never connected

Fixes #8951

- - - - -


1 changed file:

- gajim/common/logger.py


Changes:

=====================================
gajim/common/logger.py
=====================================
--- a/gajim/common/logger.py
+++ b/gajim/common/logger.py
@@ -1104,8 +1104,12 @@ class Logger:
 
         :param account_jid:     The jid of the account
         """
-
-        jid_id = self.get_jid_id(account_jid)
+        try:
+            jid_id = self.get_jid_id(account_jid)
+        except ValueError:
+            # This happens if the JID never made it to the Database
+            # because the account was never connected
+            return
 
         sql = '''
             DELETE FROM roster_entry WHERE account_jid_id = {jid_id};



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/d8777a78aa49c9edf8d9876c66c9c5b24e783a97

---
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/d8777a78aa49c9edf8d9876c66c9c5b24e783a97
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to