diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-19 13:53:25 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-19 13:53:25 +0100 |
commit | 6edf29e32c72e2d860019b2b987012fe52ac49a0 (patch) | |
tree | b8a62a483cb05a05901e2cfb5c371ba7e144360f | |
parent | 7c3acc81d9a4f83e8252779fa96703e1a72dd3db (diff) | |
download | abrt-6edf29e32c72e2d860019b2b987012fe52ac49a0.tar.gz abrt-6edf29e32c72e2d860019b2b987012fe52ac49a0.tar.xz abrt-6edf29e32c72e2d860019b2b987012fe52ac49a0.zip |
preparatory patch with trivial cleanups
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | lib/Plugins/SQLite3.cpp | 4 | ||||
-rw-r--r-- | po/POTFILES.in | 1 | ||||
-rw-r--r-- | src/Applet/Applet.cpp | 1 | ||||
-rw-r--r-- | src/CLI/CLI.cpp | 2 | ||||
-rw-r--r-- | src/Daemon/Daemon.cpp | 1 | ||||
-rw-r--r-- | src/Gui/CCDump.py | 34 | ||||
-rw-r--r-- | src/Gui/CCDumpList.py | 5 | ||||
-rw-r--r-- | src/Gui/CCMainWindow.py | 1 | ||||
-rw-r--r-- | src/Gui/CCReport.py | 30 | ||||
-rw-r--r-- | src/Gui/CCReporterDialog.py | 1 | ||||
-rw-r--r-- | src/Gui/Makefile.am | 2 |
11 files changed, 24 insertions, 58 deletions
diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp index ffcf05fe..7f90c46c 100644 --- a/lib/Plugins/SQLite3.cpp +++ b/lib/Plugins/SQLite3.cpp @@ -21,11 +21,9 @@ #include <sqlite3.h> #include <string> -#include <stdlib.h> +#include "abrtlib.h" #include "SQLite3.h" #include "ABRTException.h" -#include <limits.h> -#include <abrtlib.h> using namespace std; diff --git a/po/POTFILES.in b/po/POTFILES.in index 6f5c266f..0d218684 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -11,7 +11,6 @@ src/Gui/CC_gui_functions.py src/Gui/ccgui.glade src/Gui/CCMainWindow.py src/Gui/CCReporterDialog.py -src/Gui/CCReport.py src/Gui/CellRenderers.py src/Gui/dialogs.glade src/Gui/PluginList.py diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp index eea3ef79..550e1aac 100644 --- a/src/Applet/Applet.cpp +++ b/src/Applet/Applet.cpp @@ -20,7 +20,6 @@ #include <dbus/dbus-shared.h> #include <dbus/dbus-glib.h> #include <dbus/dbus-glib-lowlevel.h> -#include <limits.h> #if HAVE_CONFIG_H #include <config.h> #endif diff --git a/src/CLI/CLI.cpp b/src/CLI/CLI.cpp index 1ea3a5d6..bc8ddf60 100644 --- a/src/CLI/CLI.cpp +++ b/src/CLI/CLI.cpp @@ -53,7 +53,7 @@ static void print_crash_infos(vector_crash_infos_t& pCrashInfos, int pMode) for (ii = 0; ii < pCrashInfos.size(); ii++) { map_crash_info_t& info = pCrashInfos[ii]; - if (pMode == OPT_GET_LIST_FULL || info.find(CD_REPORTED)->second[CD_CONTENT] != "1") + if (pMode == OPT_GET_LIST_FULL || info[CD_REPORTED][CD_CONTENT] != "1") { const char *timestr = info[CD_TIME][CD_CONTENT].c_str(); long time = strtol(timestr, NULL, 10); diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index a2970af2..dc547af3 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -21,7 +21,6 @@ #include <pthread.h> #include <resolv.h> /* res_init */ #include <string> -#include <limits.h> #include <sys/inotify.h> #include <xmlrpc-c/base.h> #include <xmlrpc-c/client.h> diff --git a/src/Gui/CCDump.py b/src/Gui/CCDump.py index 212d4410..96d036c4 100644 --- a/src/Gui/CCDump.py +++ b/src/Gui/CCDump.py @@ -1,9 +1,11 @@ # -*- coding: utf-8 -*- from datetime import datetime -TYPE = 0 -EDITABLE = 1 -CONTENT = 2 +from abrt_utils import _, init_logging, log, log1, log2 + +CD_TYPE = 0 +CD_EDITABLE = 1 +CD_CONTENT = 2 class Dump(): """Class for mapping the debug dump to python object""" @@ -19,40 +21,40 @@ class Dump(): self.Reported = None def getUUID(self): - return self.UUID[CONTENT] + return self.UUID[CD_CONTENT] def getUID(self): - return self.UID[CONTENT] + return self.UID[CD_CONTENT] def getCount(self): - return self.Count[CONTENT] + return self.Count[CD_CONTENT] def getExecutable(self): - return self.Executable[CONTENT] + return self.Executable[CD_CONTENT] def getPackage(self): - return self.Package[CONTENT] + return self.Package[CD_CONTENT] def isReported(self): - return self.Reported[CONTENT] == "1" + return self.Reported[CD_CONTENT] == "1" def getMessage(self): if not self.Message: - return [] - #return self.Message[CONTENT].split('\n') - return self.Message[CONTENT] + return "" #[] + #return self.Message[CD_CONTENT].split('\n') + return self.Message[CD_CONTENT] def getTime(self,format): #print format if format: try: - return datetime.fromtimestamp(int(self.Time[CONTENT])).strftime(format) + return datetime.fromtimestamp(int(self.Time[CD_CONTENT])).strftime(format) except Exception, e: print e - return int(self.Time[CONTENT]) + return int(self.Time[CD_CONTENT]) def getPackageName(self): - return self.Package[CONTENT][:self.Package[CONTENT].find("-")] + return self.Package[CD_CONTENT][:self.Package[CD_CONTENT].find("-")] def getDescription(self): - return self.Description[CONTENT] + return self.Description[CD_CONTENT] diff --git a/src/Gui/CCDumpList.py b/src/Gui/CCDumpList.py index a8657e0b..9888b10f 100644 --- a/src/Gui/CCDumpList.py +++ b/src/Gui/CCDumpList.py @@ -2,6 +2,8 @@ import CCDBusBackend from CCDump import Dump +from abrt_utils import _, init_logging, log, log1, log2 + class DumpList(list): """Class to store list of debug dumps""" def __init__(self,dbus_manager=None): @@ -16,8 +18,7 @@ class DumpList(list): for row in rows: entry = Dump() for column in row: - #if column == "Reported": - # print "DumpList adding %s:%s" % (column,row[column]) + log2(" DumpList.%s='%s'", column, row[column]) entry.__dict__[column] = row[column] self.append(entry) except Exception, e: diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py index 70f780a9..a8101d49 100644 --- a/src/Gui/CCMainWindow.py +++ b/src/Gui/CCMainWindow.py @@ -28,7 +28,6 @@ from CCDumpList import getDumpList, DumpList from CCReporterDialog import ReporterDialog from PluginsSettingsDialog import PluginsSettingsDialog from SettingsDialog import SettingsDialog -from CCReport import Report from PluginList import getPluginInfoList import ABRTExceptions diff --git a/src/Gui/CCReport.py b/src/Gui/CCReport.py deleted file mode 100644 index 90c8a3b5..00000000 --- a/src/Gui/CCReport.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- - -class Report(): - """Class for mapping the report to pyhon object""" - def __init__(self, report): - self.UUID = None - self.Architecture = None - self.Kernel = None - self.Release = None - self.Executable = None - self.CmdLine = None - self.Package = None - self.TextData1 = None - self.TextData2 = None - self.BinaryData1 = None - self.BinaryData2 = None - for item in report: - self.__dict__[item] = report[item] - - def getUUID(self): - return self.UUID - - def getArchitecture(self): - return self.Architecture - - def getExecutable(self): - return self.Executable - - def getPackage(self): - return self.Package diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py index ab6ad0fa..9bc5ff59 100644 --- a/src/Gui/CCReporterDialog.py +++ b/src/Gui/CCReporterDialog.py @@ -6,7 +6,6 @@ import gtk.glade import pango import sys from CC_gui_functions import * -from CCReport import Report import CellRenderers from ABRTPlugin import PluginInfo from PluginSettingsUI import PluginSettingsUI diff --git a/src/Gui/Makefile.am b/src/Gui/Makefile.am index 60a7bfe3..3cac1ee8 100644 --- a/src/Gui/Makefile.am +++ b/src/Gui/Makefile.am @@ -3,7 +3,7 @@ bin_SCRIPTS = abrt-gui PYTHON_FILES = CCDBusBackend.py CCDumpList.py CCDump.py CC_gui_functions.py \ - CCReporterDialog.py CCReport.py abrt_utils.py \ + CCReporterDialog.py abrt_utils.py \ CCMainWindow.py CellRenderers.py ABRTExceptions.py \ SettingsDialog.py ABRTPlugin.py PluginList.py PluginSettingsUI.py \ PluginsSettingsDialog.py ConfBackend.py |