This repository has been archived on 2024-12-03. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-03/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