Changeset 14001


Ignore:
Timestamp:
2 Jul 2016, 04:51:13 (8 years ago)
Author:
Henrik Bettermann
Message:

Catch IOError if file or folder is readonly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r13992 r14001  
    891891    store = getUtility(IExtFileStore)
    892892    file_id = IFileStoreNameChooser(context).chooseName()
    893     store.createFile(file_id, upload)
     893    try:
     894        store.createFile(file_id, upload)
     895    except IOError:
     896        view.flash(_('Image file cannot be changed.'), type='danger')
     897        return False
    894898    return True
    895899
Note: See TracChangeset for help on using the changeset viewer.