This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2025-02-01/mockenv/lib/python3.6/site-packages/pybitmessage/helper_addressbook.py

15 lines
330 B
Python
Raw Normal View History

2022-07-22 12:43:59 +02:00
"""
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