From becf6dd45aba3b009a8b3aca2b3885be55299d4b Mon Sep 17 00:00:00 2001 From: Adam Boardman Date: Tue, 8 Dec 2020 23:58:43 +0000 Subject: [PATCH] Changing hard coded paths to be local to the current user --- codi-app/Addressbook.py | 2 +- codi-app/CodiFunctions.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/codi-app/Addressbook.py b/codi-app/Addressbook.py index 90236a7..2199409 100644 --- a/codi-app/Addressbook.py +++ b/codi-app/Addressbook.py @@ -12,7 +12,7 @@ def refreshContacts(): CodiStatus.Contacts = [] try: - conn = sqlite3.connect('/home/cosmo/.local/share/evolution/addressbook/system/contacts.db') + conn = sqlite3.connect('~/.local/share/evolution/addressbook/system/contacts.db') c = conn.cursor() statement = 'select * from folder_id' contacts = c.execute(statement) diff --git a/codi-app/CodiFunctions.py b/codi-app/CodiFunctions.py index ab3955d..21e7274 100644 --- a/codi-app/CodiFunctions.py +++ b/codi-app/CodiFunctions.py @@ -79,7 +79,7 @@ def ActionCall(action, sim, line, numtype, msisdn, contact, contact_id): if sim == 2: ril = DBusServer.ril1 ril.Dial(msisdn, '') - conn = sqlite3.connect('/home/cosmo/.local/share/history-service/history.sqlite') + conn = sqlite3.connect('~/.local/share/history-service/history.sqlite') try: c = conn.cursor() statement = 'insert into voice_events values ("ofono/ofono/ril_0", "' + msisdn + \ @@ -167,7 +167,7 @@ def CoDiOFF(par1, par2): def GetCallHistory(index): batchSize = 10 - conn = sqlite3.connect('/home/cosmo/.local/share/history-service/history.sqlite') + conn = sqlite3.connect('~/.local/share/history-service/history.sqlite') try: c = conn.cursor() totalCdr = c.execute('select count(*) from voice_events').fetchall()[0][0]