Commit 9dab43ea authored by Saul Ibarra's avatar Saul Ibarra

Use unlink from python-application

parent a103e558
...@@ -874,10 +874,7 @@ class ContactModel(QAbstractListModel): ...@@ -874,10 +874,7 @@ class ContactModel(QAbstractListModel):
items = pickle.load(file) items = pickle.load(file)
except Exception: except Exception:
# remove the corrupted contacts file, so it won't be backed up to contacts.bak later # remove the corrupted contacts file, so it won't be backed up to contacts.bak later
try: unlink(ApplicationData.get('contacts'))
os.unlink(ApplicationData.get('contacts'))
except Exception:
pass
file = open(ApplicationData.get('contacts.bak')) file = open(ApplicationData.get('contacts.bak'))
items = pickle.load(file) items = pickle.load(file)
file = None # restore contacts from contacts.bak file = None # restore contacts from contacts.bak
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment