Coverage for drivers/fjournaler : 89%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
#!/usr/bin/python # # Copyright (C) Citrix Systems Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; version 2.1 only. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # File-based journaling
"""Simple file-based journaler. A journal is a id-value pair, and there can be only one journal for a given id."""
"""Create an entry of type "type" for "id" with the value "val". Error if such an entry already exists.""" % (type, id, valExisting))
"""Remove the entry of type "type" for "id". Error if the entry doesn't exist."""
"""Get the value for the journal entry of type "type" for "id". Return None if no such entry exists""" except IOError as e: if e.errno == errno.ENOENT: # the file can disappear any time, since there is no locking return None raise
"""Get a mapping id->value for all entries of type "type" """ raise JournalerException("Bad file name: %s" % fileName)
|