def _make_raw_crash_and_dumps(self, form):
     dumps = DotDict()
     raw_crash = DotDict()
     raw_crash.dump_checksums = DotDict()
     for name, value in form.iteritems():
         if isinstance(value, basestring):
             raw_crash[name] = value
         elif hasattr(value, 'file') and hasattr(value, 'value'):
             dumps[name] = value.value
             raw_crash.dump_checksums[name] = \
                 self.config.collector.checksum_method(
                     value.value
                 ).hexdigest()
         elif isinstance(value, int):
             raw_crash[name] = value
         else:
             raw_crash[name] = value.value
     return raw_crash, dumps
 def _make_raw_crash_and_dumps(self, form):
     dumps = DotDict()
     raw_crash = DotDict()
     raw_crash.dump_checksums = DotDict()
     for name, value in form.iteritems():
         if isinstance(value, basestring):
             raw_crash[name] = value
         elif hasattr(value, 'file') and hasattr(value, 'value'):
             dumps[name] = value.value
             raw_crash.dump_checksums[name] = \
                 self.config.collector.checksum_method(
                     value.value
                 ).hexdigest()
         elif isinstance(value, int):
             raw_crash[name] = value
         else:
             raw_crash[name] = value.value
     return raw_crash, dumps
Example #3
0
 def _get_raw_crash_from_form(self):
     """this method creates the raw_crash and the dumps mapping using the
     POST form"""
     dumps = MemoryDumpsMapping()
     raw_crash = DotDict()
     raw_crash.dump_checksums = DotDict()
     for name, value in self._form_as_mapping().iteritems():
         name = self._no_x00_character(name)
         if isinstance(value, basestring):
             if name != "dump_checksums":
                 raw_crash[name] = self._no_x00_character(value)
         elif hasattr(value, 'file') and hasattr(value, 'value'):
             dumps[name] = value.value
             raw_crash.dump_checksums[name] = \
                 self.checksum_method(value.value).hexdigest()
         elif isinstance(value, int):
             raw_crash[name] = value
         else:
             raw_crash[name] = value.value
     return raw_crash, dumps
Example #4
0
 def _get_raw_crash_from_form(self):
     """this method creates the raw_crash and the dumps mapping using the
     POST form"""
     dumps = MemoryDumpsMapping()
     raw_crash = DotDict()
     raw_crash.dump_checksums = DotDict()
     for name, value in self._form_as_mapping().iteritems():
         name = self._no_x00_character(name)
         if isinstance(value, basestring):
             if name != "dump_checksums":
                 raw_crash[name] = self._no_x00_character(value)
         elif hasattr(value, 'file') and hasattr(value, 'value'):
             dumps[name] = value.value
             raw_crash.dump_checksums[name] = \
                 self.checksum_method(value.value).hexdigest()
         elif isinstance(value, int):
             raw_crash[name] = value
         else:
             raw_crash[name] = value.value
     return raw_crash, dumps