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

Use unlink from python-application

parent a103e558
......@@ -874,10 +874,7 @@ class ContactModel(QAbstractListModel):
items = pickle.load(file)
except Exception:
# remove the corrupted contacts file, so it won't be backed up to contacts.bak later
try:
os.unlink(ApplicationData.get('contacts'))
except Exception:
pass
unlink(ApplicationData.get('contacts'))
file = open(ApplicationData.get('contacts.bak'))
items = pickle.load(file)
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