Example #1
0
 def _getTruncatedParams(self):
     """Truncates params"""
     params = {}
     for key, value in self._reqParams.iteritems():
         if key in {'password', 'confirm_password'}:
             params[key] = '[password hidden, len=%d]' % len(value)
         elif isinstance(value, basestring):
             params[key] = truncate(value, 1024)
         else:
             params[key] = value
     return params
Example #2
0
File: base.py Project: NIIF/indico
 def _getTruncatedParams(self):
     """Truncates params"""
     params = {}
     for key, value in self._reqParams.iteritems():
         if key == 'password':
             params[key] = '[password hidden, len=%d]' % len(value)
         elif isinstance(value, basestring):
             params[key] = truncate(value, 1024)
         else:
             params[key] = value
     return params
Example #3
0
    def _getTruncatedParams(self):
        """ Truncates params, so that file objects do not show up in the logs """

        params = {}

        for key,value in self._reqParams.iteritems():
            if isinstance(value, Field):
                params[key] = "<FILE>"
            elif type(value) == str:
                params[key] = truncate(value, 1024)
            else:
                params[key] = value

        return params
Example #4
0
    def _getTruncatedParams(self):
        """ Truncates params, so that file objects do not show up in the logs """

        params = {}

        for key, value in self._reqParams.iteritems():
            if isinstance(value, Field):
                params[key] = "<FILE>"
            elif type(value) == str:
                params[key] = truncate(value, 1024)
            else:
                params[key] = value

        return params