Project

General

Profile

« Previous | Next » 

Revision 7056140d

Added by dsorber about 12 years ago

Started working on the Tag class.

View differences:

software/bookmark_library/lib/bookmark.py
def __init__(self, db_conn, id=None, url=None):
# Make sure the DB connection is valid before doing anything
# else
# Make sure the DB connection is valid before doing anything else
if not db_conn:
raise DBConnectionError('Invalid database connection object!')
......
self.last_visited = 0
self.last_reachable = 0
self.deleted = False
self.category_tags = set()
self.description_tags = set()
# Retrieve an existing bookmark
# Retrieve an existing bookmark if an ID is passed in
if self.id:
db = self._db_conn.cursor()
db.execute(SQL_SELECT_BOOKMARK, (self.id,))

Also available in: Unified diff