comparison MoinMoin/caching.py @ 1793:2a4caa295346

Eclipse PyDev Check: fixed lots of its errors and warnings
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 23 Feb 2007 13:06:42 +0100
parents 6dd2e29acffe
children b5e94fec8669
comparison
equal deleted inserted replaced
1792:c907c2942372 1793:2a4caa295346
7 """ 7 """
8 8
9 import os 9 import os
10 import tempfile 10 import tempfile
11 11
12 # cPickle can encode normal and Unicode strings 12 from MoinMoin.util import filesys, lock, pickle, PICKLE_PROTOCOL
13 # see http://docs.python.org/lib/node66.html
14 try:
15 import cPickle as pickle
16 except ImportError:
17 import pickle
18
19 # Set pickle protocol, see http://docs.python.org/lib/node64.html
20 PICKLE_PROTOCOL = pickle.HIGHEST_PROTOCOL
21
22 from MoinMoin.util import filesys, lock
23 13
24 14
25 class CacheError(Exception): 15 class CacheError(Exception):
26 """ raised if we have trouble reading or writing to the cache """ 16 """ raised if we have trouble reading or writing to the cache """
27 pass 17 pass