Compare commits
No commits in common. "569e197609aa511222e86809b3e9e35a74b0287a" and "df1229d8fdaaafcae903497521fea01ab684bfd7" have entirely different histories.
569e197609
...
df1229d8fd
3 changed files with 6 additions and 11 deletions
|
@ -36,8 +36,8 @@ class PILTransform(object):
|
||||||
def open(self, path):
|
def open(self, path):
|
||||||
try:
|
try:
|
||||||
self.im = Image.open(path)
|
self.im = Image.open(path)
|
||||||
except IOError as e:
|
except (IOError, e):
|
||||||
logger.warning(e)
|
logger.warn(e)
|
||||||
self.im = None
|
self.im = None
|
||||||
|
|
||||||
def rotate(self, angle, resize):
|
def rotate(self, angle, resize):
|
||||||
|
|
|
@ -61,7 +61,7 @@ class FileSystemStorage(object):
|
||||||
f.close()
|
f.close()
|
||||||
return data
|
return data
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
logger.warning(e)
|
logger.warn(e)
|
||||||
#'File %r cannot be read.' % fn)
|
#'File %r cannot be read.' % fn)
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ class Track(Persistent):
|
||||||
class TrackingStorage(BTreeContainer):
|
class TrackingStorage(BTreeContainer):
|
||||||
|
|
||||||
trackFactory = Track
|
trackFactory = Track
|
||||||
#indexAttributes = trackFactory.index_attributes
|
indexAttributes = trackFactory.index_attributes
|
||||||
|
|
||||||
trackNum = runId = 0
|
trackNum = runId = 0
|
||||||
runs = None # currently active runs
|
runs = None # currently active runs
|
||||||
|
@ -109,19 +109,14 @@ class TrackingStorage(BTreeContainer):
|
||||||
currentRuns = None # the currently active run for each task
|
currentRuns = None # the currently active run for each task
|
||||||
storage = None # compatibility with new cco.storage
|
storage = None # compatibility with new cco.storage
|
||||||
|
|
||||||
@property
|
|
||||||
def indexAttributes(self):
|
|
||||||
return self.trackFactory.index_attributes
|
|
||||||
|
|
||||||
def __init__(self, *args, **kw):
|
def __init__(self, *args, **kw):
|
||||||
trackFactory = kw.pop('trackFactory', None)
|
trackFactory = kw.pop('trackFactory', None)
|
||||||
if trackFactory is not None:
|
if trackFactory is not None:
|
||||||
self.trackFactory = trackFactory
|
self.trackFactory = trackFactory
|
||||||
#self.indexAttributes = trackFactory.index_attributes
|
self.indexAttributes = trackFactory.index_attributes
|
||||||
super(TrackingStorage, self).__init__(*args, **kw)
|
super(TrackingStorage, self).__init__(*args, **kw)
|
||||||
self.indexes = OOBTree.OOBTree()
|
self.indexes = OOBTree.OOBTree()
|
||||||
#for idx in self.indexAttributes:
|
for idx in self.indexAttributes:
|
||||||
for idx in (trackFactory or self.trackFactory).index_attributes:
|
|
||||||
self.indexes[idx] = FieldIndex()
|
self.indexes[idx] = FieldIndex()
|
||||||
self.runs = IOBTree.IOBTree()
|
self.runs = IOBTree.IOBTree()
|
||||||
self.finishedRuns = IOBTree.IOBTree()
|
self.finishedRuns = IOBTree.IOBTree()
|
||||||
|
|
Loading…
Add table
Reference in a new issue