profile creation - saving exception

This commit is contained in:
ingvar1995 2016-11-03 15:46:49 +03:00
parent 9f87f3dc3e
commit 5477a7d548

View file

@ -138,7 +138,18 @@ class Toxygen:
path = Settings.get_default_path() path = Settings.get_default_path()
else: else:
path = curr_directory() + '/' path = curr_directory() + '/'
ProfileHelper(path, name).save_profile(self.tox.get_savedata()) try:
ProfileHelper(path, name).save_profile(self.tox.get_savedata())
except Exception as ex:
print(str(ex))
log('Profile creation exception: ' + str(ex))
msgBox = QtGui.QMessageBox()
msgBox.setText(QtGui.QApplication.translate("login",
'Profile saving error! Does Toxygen have permission to write to this directory?',
None,
QtGui.QApplication.UnicodeUTF8))
msgBox.exec_()
return
path = Settings.get_default_path() path = Settings.get_default_path()
settings = Settings(name) settings = Settings(name)
if curr_lang in langs: if curr_lang in langs: