You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PyBitmessage-2021-04-27/src/helper_addressbook.py

15 lines
348 B
Python

"""
Insert value into addressbook
"""
from bmconfigparser import BMConfigParser
from helper_sql import sqlExecute
def insert(address, label):
"""perform insert into addressbook"""
if address not in BMConfigParser().addresses():
return sqlExecute('''INSERT INTO addressbook VALUES (?,?)''', label, address) == 1
return False