use contact module for friend command list names instead of getName()

master
Kevin Froman 2019-06-18 11:55:14 -05:00
parent 1b897ebe1d
commit cb2e803ae8
1 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@
import sys, getpass import sys, getpass
import logger, onionrexceptions import logger, onionrexceptions
from onionrusers import onionrusers from onionrusers import onionrusers, contactmanager
def add_ID(o_inst): def add_ID(o_inst):
try: try:
sys.argv[2] sys.argv[2]
@ -75,8 +75,8 @@ def friend_command(o_inst):
action = action.lower() action = action.lower()
if action == 'list': if action == 'list':
# List out peers marked as our friend # List out peers marked as our friend
for friend in onionrusers.OnionrUser.list_friends(o_inst.onionrCore): for friend in contactmanager.ContactManager.list_friends(o_inst.onionrCore):
logger.info(friend.publicKey + ' - ' + friend.getName()) logger.info(friend.publicKey + ' - ' + friend.get_info('name'))
elif action in ('add', 'remove'): elif action in ('add', 'remove'):
try: try:
friend = sys.argv[3] friend = sys.argv[3]