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/src/helper_addressbook.py

16 lines
371 B
Python
Raw Normal View History

"""
Insert value into addressbook
"""
from bmconfigparser import config
from helper_sql import sqlExecute
from dbcompat import dbstr
def insert(address, label):
"""perform insert into addressbook"""
if address not in config.addresses():
return sqlExecute('''INSERT INTO addressbook VALUES (?,?)''', dbstr(label), dbstr(address)) == 1
2020-12-23 20:42:18 +01:00
return False