X-Git-Url: https://scm.cri.ensmp.fr/git/Photo.git/blobdiff_plain/b0a7e10b4f32cf74864bb53268ca4d3080f23bc0..6c41809185e322ce2d30e98234f71144f78f06c0:/migration/from2to3.py?ds=sidebyside diff --git a/migration/from2to3.py b/migration/from2to3.py deleted file mode 100644 index 13882ca..0000000 --- a/migration/from2to3.py +++ /dev/null @@ -1,30 +0,0 @@ -from BTrees.OOBTree import OOBTree -from BTrees.IOBTree import IOBTree - -def migrate(p) : - if hasattr(p, '_variants') : - delattr(p, '_variants') - - if not hasattr(p, 'tiles_available') : - p.tiles_available = 0 - - - if hasattr(p, '_methodResultsCache') and p._methodResultsCache.has_key('_getTile'): - p._tiles = OOBTree() - for args, value in p._methodResultsCache['_getTile'].items() : - args = dict(args) - zoom = float(args['zoom']) - x = int(args['x']) - y = int(args['y']) - - if not p._tiles.has_key(zoom) : - p._tiles[zoom] = IOBTree() - if not p._tiles[zoom].has_key(x) : - p._tiles[zoom][x] = IOBTree() - - p._tiles[zoom][x][y] = value - del p._methodResultsCache['_getTile'] - - elif not hasattr(p, '_tiles'): - p._tiles = OOBTree() - p.tiles_available = 0