Changeset 9931 for main


Ignore:
Timestamp:
2 Feb 2013, 17:09:09 (12 years ago)
Author:
Henrik Bettermann
Message:

I need some info in the log file.

File:
1 edited

Legend:

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

    r9930 r9931  
    10391039            target = os.path.join(self.context.storage, normalized_filename)
    10401040            filecontent = uploadfile.read()
     1041            ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
     1042            logger = self.context.logger
    10411043
    10421044            # XXX: temporary solution to prevent users from
     
    10471049                      self.flash(_(
    10481050                          "Only ASCII files are allowed. "
    1049                           "Your file contains non-ascii characters."))
     1051                          "Your file contains non-ASCII characters."))
     1052                      logger.info('%s - non-ascii file uploaded: %s' %
     1053                          (ob_class, target))
    10501054                      return
    10511055                except TypeError:
     
    10531057                        "Only ASCII files are allowed. "
    10541058                        "Your file contains non-ASCII characters."))
     1059                    logger.info('%s - non-ascii file uploaded: %s' %
     1060                        (ob_class, target))
    10551061                    return
    10561062
    10571063            open(target, 'wb').write(filecontent)
    10581064            os.chmod(target, 0664)
    1059             logger = self.context.logger
    1060             ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
    10611065            logger.info('%s - uploaded: %s' % (ob_class, target))
    10621066            self._notifyImportManagers(filename,
Note: See TracChangeset for help on using the changeset viewer.