[Uludag-commits] r11929 - trunk/bocek/src

svn-uludag at uludag.org.tr svn-uludag at uludag.org.tr
11 Oca 2007 Per 01:42:59 EET


Author: gokmen.goksel
Date: Thu Jan 11 01:42:58 2007
New Revision: 11929

Modified:
   trunk/bocek/src/bocek.py
   trunk/bocek/src/consts.py
Log:
 * daha bi temiz ol

Modified: trunk/bocek/src/bocek.py
=================================================================
--- trunk/bocek/src/bocek.py	(original)
+++ trunk/bocek/src/bocek.py	Thu Jan 11 01:42:58 2007
@@ -54,7 +54,8 @@
         self.connect(self.buttonSend, SIGNAL('clicked()'), self.sendReport)
         self.connect(self.buttonHelp, SIGNAL('clicked()'), self.slotHelp)
         self.connect(guiApp, SIGNAL("shutDown()"), self.slotQuit)
-        os.environ["LC_ALL"] = "C"
+        os.environ['LC_ALL'] = 'C'
+        self.lastReportFile=''
 
     def slotQuit(self):
         self.deleteLater()
@@ -62,6 +63,7 @@
 
     def buildReport(self):
         self.output=""
+        self.labelStatus.setText("Please wait while collecting informations ..")
         checkedLogs = self.getCheckedLogs()
         # self.output ="From : %s (%s) at %s\n"%(lineEmail.text(),getIp,time)
         self.output+="Summary : %s \n" % self.lineSummary.text()
@@ -75,7 +77,6 @@
         for logs in checkedLogs:
             for log in logs:
                 self.output+="\n========» %s «========\n" % log
-                self.labelStatus.setText("%s is getting.." % log)
                 if logs[log]==1:
                     self.output+=self.getStaticOutput(log)
                 elif logs[log]==2:
@@ -87,6 +88,8 @@
         self.lastReportFile = self.writeReport()
 
     def sendReport(self):
+        if not self.lastReportFile:
+            self.buildReport()
         if mail.send_mail(str(self.lineEmail.text()),
                           ["gokmen at pardus.org.tr"],
                           str(self.lineSummary.text()),

Modified: trunk/bocek/src/consts.py
=================================================================
--- trunk/bocek/src/consts.py	(original)
+++ trunk/bocek/src/consts.py	Thu Jan 11 01:42:58 2007
@@ -1,10 +1,18 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2007, TUBITAK/UEKAE
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version. Please read the COPYING file.
+
 # consts. 1:is static file, 2:is command output
 
-standartLogs= {#"/var/log/comar.log"         :1,
-               "/var/log/user.log"          :1,
-               "/var/log/Xorg.0.log"        :1,
+standartLogs= {"/usr/bin/uname -a"          :2,
                "/bin/dmesg"                 :2,
-               "/usr/bin/uname -a"          :2}
+               "/var/log/Xorg.0.log"        :1}
 hardwareInfo= {"/bin/mount"                 :2,
                "/sbin/ifconfig -a"          :2,
                "/usr/sbin/iwconfig"         :2,
@@ -27,6 +35,6 @@
                "/etc/mudur/language"        :1,
                "/etc/mudur/locale"          :1,
                "/etc/mudur/keymap"          :1}
-packageInfo = {"/usr/bin/pisi li -l"        :2,
+packageInfo = {"/usr/bin/pisi li -i"        :2,
                "/usr/bin/pisi lr"           :2,
-               "/usr/bin/pisi lu -l"        :2}
+               "/usr/bin/pisi lu -i"        :2}


Uludag-commits mesaj listesiyle ilgili daha fazla bilgi