From e81d73bcd7fefa683e029d29a55275904c08730a Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 9 Apr 2003 03:29:08 +0000 Subject: [PATCH] Pychecker cleanup svn: r1430 --- gramps2/src/Find.py | 4 +--- gramps2/src/GrampsCfg.py | 1 + gramps2/src/ImageSelect.py | 3 ++- gramps2/src/Report.py | 4 +--- gramps2/src/TarFile.py | 1 - gramps2/src/gramps_main.py | 4 +--- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/gramps2/src/Find.py b/gramps2/src/Find.py index 8bc7a09b3..4c609e2f8 100644 --- a/gramps2/src/Find.py +++ b/gramps2/src/Find.py @@ -44,8 +44,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import GrampsCfg -import AutoComp import Utils from intl import gettext as _ @@ -76,7 +74,7 @@ class FindBase: self.forward_button = self.glade.get_widget('forward') self.back_button = self.glade.get_widget('back') Utils.set_titles(self.top, self.glade.get_widget('title'), name) - + self.list = None self.index = 0 def get_value(self,id): diff --git a/gramps2/src/GrampsCfg.py b/gramps2/src/GrampsCfg.py index b0fb09402..da762603d 100644 --- a/gramps2/src/GrampsCfg.py +++ b/gramps2/src/GrampsCfg.py @@ -40,6 +40,7 @@ import gconf import gtk import gtk.glade import gnome +import gnome.ui #------------------------------------------------------------------------- # diff --git a/gramps2/src/ImageSelect.py b/gramps2/src/ImageSelect.py index 36f62e293..15b903b19 100644 --- a/gramps2/src/ImageSelect.py +++ b/gramps2/src/ImageSelect.py @@ -77,7 +77,8 @@ class ImageSelect: self.parent = parent self.canvas_list = {} self.p_map = {} - + self.canvas = None + def add_thumbnail(self, photo): "should be overrridden" pass diff --git a/gramps2/src/Report.py b/gramps2/src/Report.py index 69c8bafa0..0cb3be5fc 100644 --- a/gramps2/src/Report.py +++ b/gramps2/src/Report.py @@ -37,6 +37,7 @@ import string # #------------------------------------------------------------------------- import gtk +import gnome import gnome.ui #------------------------------------------------------------------------- @@ -52,7 +53,6 @@ import TextDoc import StyleEditor import GrampsCfg import PaperMenu -import Errors from intl import gettext as _ from QuestionDialog import ErrorDialog @@ -534,7 +534,6 @@ class ReportDialog: label = gtk.Label("%s:" % _("Styles")) label.set_alignment(0.0,0.5) - hbox = gtk.HBox() self.style_menu = gtk.OptionMenu() self.style_button = gtk.Button("%s..." % _("Style Editor")) self.style_button.connect('clicked',self.on_style_edit_clicked) @@ -832,7 +831,6 @@ class ReportDialog: row += 1 def setup_other_frames(self): - pad = ReportDialog.border_pad for key in self.frame_names: list = self.frames[key] table = gtk.Table(3,len(list)) diff --git a/gramps2/src/TarFile.py b/gramps2/src/TarFile.py index 01a362739..5e238eac4 100644 --- a/gramps2/src/TarFile.py +++ b/gramps2/src/TarFile.py @@ -20,7 +20,6 @@ import gzip import cStringIO import string -import os _BLKSIZE=512 nul = '\0' diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 718669e21..7b464e99c 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -26,7 +26,6 @@ #------------------------------------------------------------------------- import string import os -import sys #------------------------------------------------------------------------- # @@ -855,10 +854,9 @@ class Gramps: if not path: return 1 - filename = os.path.normpath(os.path.abspath(filename)) Utils.clear_timer() - filename = "%s/autosave.gramps" % (self.db.getSavePath()) + filename = "%s/autosave.gramps" % (path) self.status_text(_("autosaving...")); try: