Commit 85a3822c authored by Jeremy Hylton's avatar Jeremy Hylton

Make the defaults bools instead of ints.

parent 33f3c4a3
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
############################################################################## ##############################################################################
"""Handy standard storage machinery """Handy standard storage machinery
$Id: BaseStorage.py,v 1.42 2004/02/19 18:51:03 jeremy Exp $ $Id: BaseStorage.py,v 1.43 2004/02/26 22:53:23 jeremy Exp $
""" """
import cPickle import cPickle
import threading import threading
...@@ -31,7 +31,7 @@ from ZODB.utils import z64 ...@@ -31,7 +31,7 @@ from ZODB.utils import z64
class BaseStorage(UndoLogCompatible): class BaseStorage(UndoLogCompatible):
_transaction=None # Transaction that is being committed _transaction=None # Transaction that is being committed
_tstatus=' ' # Transaction status, used for copying data _tstatus=' ' # Transaction status, used for copying data
_is_read_only = 0 _is_read_only = False
def __init__(self, name, base=None): def __init__(self, name, base=None):
self.__name__= name self.__name__= name
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
############################################################################## ##############################################################################
"""Storage implementation using a log written to a single file. """Storage implementation using a log written to a single file.
$Revision: 1.5 $ $Revision: 1.6 $
""" """
import base64 import base64
...@@ -116,7 +116,7 @@ class FileStorage(BaseStorage.BaseStorage, ...@@ -116,7 +116,7 @@ class FileStorage(BaseStorage.BaseStorage,
quota=None): quota=None):
if read_only: if read_only:
self._is_read_only = 1 self._is_read_only = True
if create: if create:
raise ValueError("can't create a read-only file") raise ValueError("can't create a read-only file")
elif stop is not None: elif stop is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment