예제 #1
0
 def _debug_report(self, file):
     # TODO: Add config setting dump
     report = "pyLoad {} Debug Report of {} {}\n\n{}\n\n{}\n\n{}\n\n{}".format(
         self.pyload.__version__, file.plugin.__name__,
         file.plugin.__version__, debug.format_traceback(),
         debug.format_framestack(), debug.format_dump(file.plugin),
         debug.format_dump(file))
     return report
예제 #2
0
    def _gen_reports(self, file):
        si_entries = (('pyload version', self.pyload.version),
                      ('system platform', sys.platform), ('system version',
                                                          sys.version),
                      ('system encoding', sys.getdefaultencoding()),
                      ('file-system encoding', sys.getfilesystemencoding()),
                      ('current working directory', os.getcwd()))
        si_title = 'SYSTEM INFO:'
        si_body = os.linesep.join('\t{0:20} = {1}'.format(name, value)
                                  for name, value in si_entries)
        sysinfo = os.linesep.join((si_title, si_body))

        # TODO: Add config setting dump
        reports = (('traceback.txt', debug.format_traceback()),
                   ('framestack.txt', debug.format_framestack()),
                   ('plugindump.txt', debug.format_dump(file.plugin)),
                   ('filedump.txt', debug.format_dump(file)), ('sysinfo.txt',
                                                               sysinfo))
        return reports