Changeset 284

Show
Ignore:
Timestamp:
02/24/06 04:44:02
Author:
mylan
Message:

Clear MetaWeblogAPI.newMediaObject function for conformance to MetaWeblog? API

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • SimpleBlog/branches/plone-2.0.5-Blogging-APIs/MetaWeblogAPI.py

    r283 r284  
    276276 
    277277        if not media_name or media_name.startswith('.'): 
    278             return "No 'name' of media object supply or starts with '.'" 
     278            raise AttributeError, "No 'name' of media object supply or starts with '.'" 
    279279        if not mime_type: 
    280             #mime_type = "images/jpg" 
    281             return "No 'type' of media object supply" 
     280            raise AttributeError, "No 'type' of media object supply" 
    282281        if not (mime_type.startswith('image') or mime_type.startswith('application')): 
    283             return "%s - not supported mime tipe." % mime_type 
     282            raise AttributeError, "'%s' - not supported mime tipe." % mime_type 
    284283 
    285284        if not 'images' in blog.objectIds():