Menu

#101 Format.Load doesn't check to see if BLOBManager.Open worked

0.49
accepted
nobody
Logic
General-Bug
2016-07-14
2012-11-28
No

Loading a format by name can fail with a stupid meaningless error message if the format does not exist because Format.Load does not check to see if the open action worked. Doh!

  File "/usr/lib/python2.6/site-packages/OpenGroupware-0.1.49rc5-py2.6.egg/coils/logic/workflow/get_format.py", line 41, in run
    format = Format.Load(self.name)
  File "/usr/lib/python2.6/site-packages/OpenGroupware-0.1.49rc5-py2.6.egg/coils/logic/workflow/formats/format.py", line 184, in Load
    description = pickle.load(handle)
  File "/usr/lib64/python2.6/pickle.py", line 1370, in load
    return Unpickler(file).load()
  File "/usr/lib64/python2.6/pickle.py", line 841, in __init__
    self.readline = file.readline
AttributeError: 'NoneType' object has no attribute 'readline'

It should return a a no-such-format exception if no definition exists.

Related

Wiki: RoadMap

Discussion

  • Adam Tauno Williams

    • status: open --> accepted
     
  • Adam Tauno Williams

    • Layer: --> Logic
    • Type: --> General-Bug
     

Log in to post a comment.

MongoDB Logo MongoDB