bug fixes

This commit is contained in:
ingvar1995 2016-04-29 22:57:34 +03:00
parent fd80e1f142
commit 0cf459e3a9
4 changed files with 7 additions and 6 deletions

View file

@ -172,6 +172,10 @@ class ProfileHelper(object):
path = path.decode(locale.getpreferredencoding())
ProfileHelper._path = path + name + '.tox'
ProfileHelper._directory = path
# create /avatars if not exists:
directory = path + 'avatars'
if not os.path.exists(directory):
os.makedirs(directory)
with open(ProfileHelper._path, 'rb') as fl:
data = fl.read()
if data: