Logo Search packages:      
Sourcecode: yum-utils version File versions  Download package

def yum-debug-dump::YumDebugDump::create_debug_file (   self,
  fn = None 
)
create debug txt file and compress it, place it at yum_debug_dump.txt.gz
   unless fn is specified

Definition at line 156 of file yum-debug-dump.py.

                                        :
        """create debug txt file and compress it, place it at yum_debug_dump.txt.gz
           unless fn is specified"""
        if not fn:
            now = time.strftime("%Y-%m-%d_%T", time.localtime(time.time()))
            fn = 'yum_debug_dump-%s-%s.txt.gz' % (os.uname()[1], now)

        if not fn.startswith('/'):
            fn = '%s/%s' % (os.getcwd(), fn)

        if fn.endswith('.gz'):
            fo = gzip.GzipFile(fn, 'w')
        else:
            fo = open(fn, 'w')

        msg = "yum-debug-dump version %s\n" % self.file_version
        fo.write(msg)
        fo.write(self.dump_system_info())
        fo.write(self.dump_yum_config_info())
        fo.write(self.dump_rpm_problems())
        fo.write(self.dump_rpmdb())
        if not self.opts.norepos:
            fo.write(self.dump_repos())
        fo.write(self.dump_rpmdb_versions())
        fo.close()
        return fn


Generated by  Doxygen 1.6.0   Back to index