profile helper test

This commit is contained in:
ingvar1995 2016-10-28 00:55:34 +03:00
parent e5a228906d
commit 34dd74ad48
6 changed files with 23 additions and 10 deletions

View file

@ -30,7 +30,7 @@ class BaseContact:
self.load_avatar()
# -----------------------------------------------------------------------------------------------------------------
# name - current name or alias of user
# Name - current name or alias of user
# -----------------------------------------------------------------------------------------------------------------
def get_name(self):

View file

@ -2,6 +2,7 @@ import random
class Node:
def __init__(self, ip, port, tox_key, rand):
self._ip, self._port, self._tox_key, self.rand = ip, port, tox_key, rand

View file

@ -45,8 +45,7 @@ class AudioFile:
format=self.p.get_format_from_width(self.wf.getsampwidth()),
channels=self.wf.getnchannels(),
rate=self.wf.getframerate(),
output=True
)
output=True)
def play(self):
data = self.wf.readframes(self.chunk)

View file

@ -202,8 +202,8 @@ class Settings(dict, Singleton):
app_settings = {}
if 'active_profile' not in app_settings:
app_settings['active_profile'] = []
profilepath = ProfileHelper.get_path()
app_settings['active_profile'].append(str(profilepath + str(self.name) + '.tox'))
profile_path = ProfileHelper.get_path()
app_settings['active_profile'].append(str(profile_path + str(self.name) + '.tox'))
data = json.dumps(app_settings)
with open(path, 'w') as fl:
fl.write(data)