This repository has been archived on 2024-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-26/mockenv/lib/python3.6/site-packages/pybitmessage/helper_addressbook.py
2022-07-22 16:13:59 +05:30

15 lines
330 B
Python

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