new logging scheme
svn: r6080
This commit is contained in:
parent
2611a0e4c6
commit
dfeb7259b3
21
ChangeLog
21
ChangeLog
@ -1,4 +1,25 @@
|
|||||||
2006-03-04 Don Allingham <don@gramps-project.org>
|
2006-03-04 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/GrampsDb/_ReadGedcom.py: use new logging scheme
|
||||||
|
* src/GrampsDb/_ReadXML.py: use new logging scheme
|
||||||
|
* src/GrampsDb/_WriteGedcom.py: use new logging scheme
|
||||||
|
* src/GrampsDb/_WriteXML.py: use new logging scheme
|
||||||
|
* src/plugins/FilterEditor.py: use new logging scheme
|
||||||
|
* src/plugins/WriteCD.py: use new logging scheme
|
||||||
|
* src/plugins/ImportGeneWeb.py: use new logging scheme
|
||||||
|
* src/plugins/BookReport.py: use new logging scheme
|
||||||
|
* src/plugins/WritePkg.py: use new logging scheme
|
||||||
|
* src/plugins/ExportVCard.py: use new logging scheme
|
||||||
|
* src/plugins/Rebuild.py: use new logging scheme
|
||||||
|
* src/plugins/ImportvCard.py: use new logging scheme
|
||||||
|
* src/plugins/GraphViz.py: use new logging scheme
|
||||||
|
* src/plugins/Check.py: use new logging scheme
|
||||||
|
* src/plugins/NavWebPage.py: use new logging scheme
|
||||||
|
* src/plugins/ExportVCalendar.py: use new logging scheme
|
||||||
|
* src/plugins/ReadPkg.py: use new logging scheme
|
||||||
|
* src/plugins/WriteFtree.py: use new logging scheme
|
||||||
|
* src/plugins/WriteGeneWeb.py: use new logging scheme
|
||||||
|
* src/plugins/WebPage.py: removed
|
||||||
|
* src/DisplayTrace.py: removed
|
||||||
* src/Editors/EditEventRef.py: derive from EditReference
|
* src/Editors/EditEventRef.py: derive from EditReference
|
||||||
* src/const.py.in: change glade file names
|
* src/const.py.in: change glade file names
|
||||||
* src/glade/rule.glade: moved to subdirectory
|
* src/glade/rule.glade: moved to subdirectory
|
||||||
|
@ -7,6 +7,7 @@ AC_PREREQ(2.57)
|
|||||||
AC_INIT(gramps, 2.1.0, gramps-bugs@lists.sourceforge.net)
|
AC_INIT(gramps, 2.1.0, gramps-bugs@lists.sourceforge.net)
|
||||||
AC_CONFIG_SRCDIR(src/gramps.py)
|
AC_CONFIG_SRCDIR(src/gramps.py)
|
||||||
AM_INIT_AUTOMAKE(1.6.3)
|
AM_INIT_AUTOMAKE(1.6.3)
|
||||||
|
|
||||||
RELEASE=0.SVN$(svnversion -n .)
|
RELEASE=0.SVN$(svnversion -n .)
|
||||||
dnl RELEASE=1
|
dnl RELEASE=1
|
||||||
|
|
||||||
|
@ -1,124 +0,0 @@
|
|||||||
#
|
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
|
||||||
#
|
|
||||||
# Copyright (C) 2002-2005 Donald N. Allingham
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Standard python modules
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
import cStringIO
|
|
||||||
import traceback
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
from gettext import gettext as _
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# GTK/GNOME modules
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
import gtk
|
|
||||||
import gtk.glade
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# GRAMPS modules
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
import const
|
|
||||||
|
|
||||||
_release_files = [
|
|
||||||
"/etc/mandrake-release",
|
|
||||||
"/etc/redhat-release",
|
|
||||||
"/etc/fedora-release",
|
|
||||||
"/etc/turbolinux-release",
|
|
||||||
"/etc/debian_version",
|
|
||||||
"/etc/environment.corel",
|
|
||||||
"/etc/debian-release",
|
|
||||||
"/etc/SuSE-release",
|
|
||||||
"/etc/slackware-release",
|
|
||||||
"/etc/slackware-version",
|
|
||||||
"/etc/gentoo-release",
|
|
||||||
]
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# DisplayTrace
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
class DisplayTrace:
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
data = sys.exc_info()
|
|
||||||
ver = sys.version_info
|
|
||||||
|
|
||||||
msg = cStringIO.StringIO()
|
|
||||||
msg.write(_('GRAMPS has encountered an internal error.\n'
|
|
||||||
'Please copy the message below and post a bug report\n'
|
|
||||||
'at http://sourceforge.net/projects/gramps or send an\n'
|
|
||||||
'email message to gramps-bugs@lists.sourceforge.net\n\n'))
|
|
||||||
|
|
||||||
msg.write("GRAMPS : %s\n" % const.version)
|
|
||||||
if os.environ.has_key('LANG'):
|
|
||||||
msg.write("LANG : %s\n" % os.environ['LANG'])
|
|
||||||
if os.environ.has_key('LANGUAGE'):
|
|
||||||
msg.write("LANGUAGE : %s\n" % os.environ['LANGUAGE'])
|
|
||||||
msg.write("Python : %s.%s.%s %s\n" % (ver[0],ver[1],ver[2],ver[3]))
|
|
||||||
msg.write("GTK : %s.%s.%s\n" % gtk.gtk_version)
|
|
||||||
msg.write('PyGTK : %d.%d.%d\n' % gtk.pygtk_version)
|
|
||||||
n = '/etc/lsb-release'
|
|
||||||
if os.path.isfile(n):
|
|
||||||
f = open(n)
|
|
||||||
for line in f.readlines():
|
|
||||||
(val,text) = line.split('=')
|
|
||||||
if val == "DISTRIB_DESCRIPTION":
|
|
||||||
msg.write("OS : %s\n" % text.replace('"',''))
|
|
||||||
f.close()
|
|
||||||
else:
|
|
||||||
for n in _release_files:
|
|
||||||
if os.path.isfile(n):
|
|
||||||
try:
|
|
||||||
f = open(n)
|
|
||||||
text = f.readline()
|
|
||||||
if n.find('debian') != -1:
|
|
||||||
text = "Debian %s" % text
|
|
||||||
msg.write("OS : %s\n" % text)
|
|
||||||
f.close()
|
|
||||||
break
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
traceback.print_exception(data[0],data[1],data[2],None,msg)
|
|
||||||
|
|
||||||
self.glade = gtk.glade.XML(const.pluginsFile,"plugstat","gramps")
|
|
||||||
self.top = self.glade.get_widget("plugstat")
|
|
||||||
window = self.glade.get_widget("text")
|
|
||||||
self.top.set_title("%s - GRAMPS" % _('Internal Error'))
|
|
||||||
|
|
||||||
window.get_buffer().set_text(msg.getvalue())
|
|
||||||
print msg.getvalue()
|
|
||||||
|
|
||||||
window.connect('delete_event',self.close)
|
|
||||||
self.glade.get_widget('button107').connect('clicked',self.close)
|
|
||||||
|
|
||||||
def close(self,obj):
|
|
||||||
self.top.destroy()
|
|
@ -32,7 +32,6 @@ import re
|
|||||||
import string
|
import string
|
||||||
import const
|
import const
|
||||||
import time
|
import time
|
||||||
import logging
|
|
||||||
|
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
@ -42,6 +41,13 @@ try:
|
|||||||
except NameError:
|
except NameError:
|
||||||
from sets import Set as set
|
from sets import Set as set
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".GedcomImport")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -60,16 +66,16 @@ import Errors
|
|||||||
import RelLib
|
import RelLib
|
||||||
import DateParser
|
import DateParser
|
||||||
import NameDisplay
|
import NameDisplay
|
||||||
import DisplayTrace
|
|
||||||
from ansel_utf8 import ansel_to_utf8
|
|
||||||
import Utils
|
import Utils
|
||||||
import Mime
|
import Mime
|
||||||
|
import _ConstXML
|
||||||
|
|
||||||
|
from ansel_utf8 import ansel_to_utf8
|
||||||
from bsddb import db
|
from bsddb import db
|
||||||
from _GedcomInfo import *
|
from _GedcomInfo import *
|
||||||
from _GedTokens import *
|
from _GedTokens import *
|
||||||
from QuestionDialog import ErrorDialog, WarningDialog
|
from QuestionDialog import ErrorDialog, WarningDialog
|
||||||
from _GrampsDbBase import EVENT_KEY
|
from _GrampsDbBase import EVENT_KEY
|
||||||
import _ConstXML
|
|
||||||
|
|
||||||
addr_re = re.compile('(.+)([\n\r]+)(.+)\s*,(.+)\s+(\d+)\s*(.*)')
|
addr_re = re.compile('(.+)([\n\r]+)(.+)\s*,(.+)\s+(\d+)\s*(.*)')
|
||||||
addr2_re = re.compile('(.+)([\n\r]+)(.+)\s*,(.+)\s+(\d+)')
|
addr2_re = re.compile('(.+)([\n\r]+)(.+)\s*,(.+)\s+(\d+)')
|
||||||
@ -104,8 +110,6 @@ def latin_to_utf8(s):
|
|||||||
def nocnv(s):
|
def nocnv(s):
|
||||||
return unicode(s)
|
return unicode(s)
|
||||||
|
|
||||||
log = logging.getLogger('.GEDCOM_import')
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# constants
|
# constants
|
||||||
@ -213,9 +217,6 @@ def import2(database, filename, callback, codeset, use_trans):
|
|||||||
except IOError,msg:
|
except IOError,msg:
|
||||||
ErrorDialog(_("%s could not be opened\n") % filename,str(msg))
|
ErrorDialog(_("%s could not be opened\n") % filename,str(msg))
|
||||||
return
|
return
|
||||||
except:
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return
|
|
||||||
|
|
||||||
if database.get_number_of_people() == 0:
|
if database.get_number_of_people() == 0:
|
||||||
use_trans = False
|
use_trans = False
|
||||||
@ -236,9 +237,7 @@ def import2(database, filename, callback, codeset, use_trans):
|
|||||||
'run the Check and Repair Database tool to fix the '
|
'run the Check and Repair Database tool to fix the '
|
||||||
'problem.'))
|
'problem.'))
|
||||||
return
|
return
|
||||||
except:
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -32,6 +32,14 @@ from xml.parsers.expat import ExpatError, ParserCreate
|
|||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".ReadXML")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GTK+ Modules
|
# GTK+ Modules
|
||||||
@ -154,10 +162,6 @@ def importData(database, filename, callback=None,cl=0,use_trans=False):
|
|||||||
import traceback
|
import traceback
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
os._exit(1)
|
os._exit(1)
|
||||||
else:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return
|
|
||||||
|
|
||||||
xml_file.close()
|
xml_file.close()
|
||||||
|
|
||||||
|
@ -32,6 +32,14 @@ import re
|
|||||||
import shutil
|
import shutil
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".WriteGedcom")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GNOME/GTK modules
|
# GNOME/GTK modules
|
||||||
@ -292,11 +300,7 @@ def fmtline(text,limit,level,endl):
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def writeData(database,person):
|
def writeData(database,person):
|
||||||
try:
|
|
||||||
GedcomWriter(database,person)
|
GedcomWriter(database,person)
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -1351,9 +1355,6 @@ def exportData(database,filename,person,option_box,callback=None):
|
|||||||
ret = gw.export_data(filename)
|
ret = gw.export_data(filename)
|
||||||
except Errors.DatabaseError,msg:
|
except Errors.DatabaseError,msg:
|
||||||
ErrorDialog(_("Export failed"),str(msg))
|
ErrorDialog(_("Export failed"),str(msg))
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -36,6 +36,14 @@ import os
|
|||||||
import codecs
|
import codecs
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".WriteXML")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# load gtk libraries
|
# load gtk libraries
|
||||||
@ -87,23 +95,9 @@ def exportData(database, filename, person, callback=None):
|
|||||||
|
|
||||||
compress = _gzip_ok == 1
|
compress = _gzip_ok == 1
|
||||||
|
|
||||||
try:
|
|
||||||
g = XmlWriter(database,callback,0,compress)
|
g = XmlWriter(database,callback,0,compress)
|
||||||
t = time.time()
|
t = time.time()
|
||||||
ret = g.write(filename)
|
ret = g.write(filename)
|
||||||
print time.time()-t
|
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
ErrorDialog(_("Failure writing %s") % filename,
|
|
||||||
_("An attempt is being made to recover the original file"))
|
|
||||||
shutil.copyfile(filename + ".bak", filename)
|
|
||||||
try:
|
|
||||||
shutil.copystat(filename + ".bak", filename)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -109,10 +109,9 @@ license = os.path.join(root_dir,"COPYING")
|
|||||||
glade_dir = os.path.join(root_dir,"glade")
|
glade_dir = os.path.join(root_dir,"glade")
|
||||||
gladeFile = os.path.join(glade_dir,"gramps.glade")
|
gladeFile = os.path.join(glade_dir,"gramps.glade")
|
||||||
person_glade = os.path.join(glade_dir,"edit_person.glade")
|
person_glade = os.path.join(glade_dir,"edit_person.glade")
|
||||||
pluginsFile = os.path.join(root_dir,"plugins.glade")
|
plugins_glade = os.path.join(glade_dir,"plugins.glade")
|
||||||
mergeFile = os.path.join(root_dir,"mergedata.glade")
|
merge_glade = os.path.join(glade_dir,"mergedata.glade")
|
||||||
merge2File = os.path.join(root_dir,"merge.glade")
|
rule_glade = os.path.join(glade_dir,"rule.glade")
|
||||||
filterFile = os.path.join(root_dir,"rule.glade")
|
|
||||||
|
|
||||||
|
|
||||||
pluginsDir = os.path.join(root_dir,"plugins")
|
pluginsDir = os.path.join(root_dir,"plugins")
|
||||||
|
@ -47,6 +47,14 @@ _TB = 'Times-Bold'
|
|||||||
_TI = 'Times-Italic'
|
_TI = 'Times-Italic'
|
||||||
_TBI = 'Times-BoldItalic'
|
_TBI = 'Times-BoldItalic'
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".PdfDoc")
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# ReportLab python/PDF modules
|
# ReportLab python/PDF modules
|
||||||
@ -183,9 +191,6 @@ class PdfDoc(BaseDoc.BaseDoc):
|
|||||||
except IOError,msg:
|
except IOError,msg:
|
||||||
errmsg = "%s\n%s" % (_("Could not create %s") % self.filename, msg)
|
errmsg = "%s\n%s" % (_("Could not create %s") % self.filename, msg)
|
||||||
raise Errors.ReportError(errmsg)
|
raise Errors.ReportError(errmsg)
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
|
|
||||||
if self.print_req:
|
if self.print_req:
|
||||||
apptype = 'application/pdf'
|
apptype = 'application/pdf'
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||||
|
|
||||||
<glade-interface>
|
<glade-interface>
|
||||||
<requires lib="gnome"/>
|
|
||||||
|
|
||||||
<widget class="GtkDialog" id="source_editor">
|
<widget class="GtkDialog" id="source_editor">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||||
|
|
||||||
<glade-interface>
|
<glade-interface>
|
||||||
<requires lib="gnome"/>
|
|
||||||
|
|
||||||
<widget class="GtkDialog" id="define_filter">
|
<widget class="GtkDialog" id="define_filter">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||||
|
|
||||||
<glade-interface>
|
<glade-interface>
|
||||||
<requires lib="gnome"/>
|
|
||||||
|
|
||||||
<widget class="GtkDialog" id="scratch_pad">
|
<widget class="GtkDialog" id="scratch_pad">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -141,14 +141,7 @@ def setup_logging():
|
|||||||
|
|
||||||
def run():
|
def run():
|
||||||
|
|
||||||
try:
|
|
||||||
setup_logging()
|
setup_logging()
|
||||||
except:
|
|
||||||
# If logging can't be started fall back on
|
|
||||||
# old exception display
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import gnome
|
import gnome
|
||||||
|
@ -31,6 +31,14 @@
|
|||||||
import os
|
import os
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".BookReport")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# SAX interface
|
# SAX interface
|
||||||
@ -1088,7 +1096,6 @@ def cl_report(database,name,category,options_str_dict):
|
|||||||
this_style_name,style_sheet.get_style(this_style_name))
|
this_style_name,style_sheet.get_style(this_style_name))
|
||||||
|
|
||||||
# write report
|
# write report
|
||||||
try:
|
|
||||||
doc = clr.format(selected_style,clr.paper,clr.template_name,clr.orien)
|
doc = clr.format(selected_style,clr.paper,clr.template_name,clr.orien)
|
||||||
rptlist = []
|
rptlist = []
|
||||||
newpage = 0
|
newpage = 0
|
||||||
@ -1106,9 +1113,6 @@ def cl_report(database,name,category,options_str_dict):
|
|||||||
item.begin_report()
|
item.begin_report()
|
||||||
item.write_report()
|
item.write_report()
|
||||||
doc.close()
|
doc.close()
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -32,6 +32,14 @@ import cStringIO
|
|||||||
import sets
|
import sets
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".CheckRepair")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# gtk modules
|
# gtk modules
|
||||||
@ -136,7 +144,6 @@ class Check(Tool.Tool):
|
|||||||
# def runTool(database,active_person,callback,parent=None):
|
# def runTool(database,active_person,callback,parent=None):
|
||||||
cli = int(parent == None)
|
cli = int(parent == None)
|
||||||
|
|
||||||
try:
|
|
||||||
if db.readonly:
|
if db.readonly:
|
||||||
# TODO: split plugin in a check and repair part to support
|
# TODO: split plugin in a check and repair part to support
|
||||||
# checking of a read only database
|
# checking of a read only database
|
||||||
@ -177,9 +184,6 @@ class Check(Tool.Tool):
|
|||||||
errs = checker.build_report(cli)
|
errs = checker.build_report(cli)
|
||||||
if errs:
|
if errs:
|
||||||
Report(checker.text.getvalue(),parent)
|
Report(checker.text.getvalue(),parent)
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -38,6 +38,14 @@ from time import localtime
|
|||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".ExportVCal")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
@ -301,12 +309,8 @@ class CalendarWriter:
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def exportData(database,filename,person,option_box):
|
def exportData(database,filename,person,option_box):
|
||||||
ret = 0
|
ret = 0
|
||||||
try:
|
|
||||||
cw = CalendarWriter(database,person,0,filename,option_box)
|
cw = CalendarWriter(database,person,0,filename,option_box)
|
||||||
ret = cw.export_data(filename)
|
ret = cw.export_data(filename)
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -29,6 +29,14 @@
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".ExportVCard")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GNOME/GTK modules
|
# GNOME/GTK modules
|
||||||
@ -220,12 +228,8 @@ class CardWriter:
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def exportData(database,filename,person,option_box):
|
def exportData(database,filename,person,option_box):
|
||||||
ret = 0
|
ret = 0
|
||||||
try:
|
|
||||||
cw = CardWriter(database,person,0,filename,option_box)
|
cw = CardWriter(database,person,0,filename,option_box)
|
||||||
ret = cw.export_data(filename)
|
ret = cw.export_data(filename)
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -32,6 +32,14 @@ __author__ = "Don Allingham"
|
|||||||
import os
|
import os
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".FilterEdit")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GTK/GNOME
|
# GTK/GNOME
|
||||||
@ -854,10 +862,6 @@ class EditRule:
|
|||||||
self.window.destroy()
|
self.window.destroy()
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
self.window.destroy()
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -32,6 +32,14 @@ import os
|
|||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
from time import asctime
|
from time import asctime
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".GraphViz")
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GNOME/gtk
|
# GNOME/gtk
|
||||||
@ -894,17 +902,14 @@ class EmptyDoc:
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
def cl_report(database,name,category,options_str_dict):
|
def cl_report(database,name,category,options_str_dict):
|
||||||
|
|
||||||
clr = Report.CommandLineReport(database,name,category,GraphVizOptions,options_str_dict)
|
clr = Report.CommandLineReport(database,name,category,GraphVizOptions,
|
||||||
|
options_str_dict)
|
||||||
|
|
||||||
# Exit here if show option was given
|
# Exit here if show option was given
|
||||||
if clr.show:
|
if clr.show:
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
|
||||||
GraphViz(database,clr.person,clr.option_class)
|
GraphViz(database,clr.person,clr.option_class)
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -31,6 +31,14 @@ import re
|
|||||||
import time
|
import time
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".ImportGeneWeb")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GTK/GNOME Modules
|
# GTK/GNOME Modules
|
||||||
@ -80,11 +88,6 @@ def importData(database, filename, cb=None):
|
|||||||
except IOError,msg:
|
except IOError,msg:
|
||||||
ErrorDialog(_("%s could not be opened\n") % filename,str(msg))
|
ErrorDialog(_("%s could not be opened\n") % filename,str(msg))
|
||||||
return
|
return
|
||||||
except:
|
|
||||||
ErrorDialog(_("%s could not be opened\n") % filename)
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
status = g.parse_geneweb_file()
|
status = g.parse_geneweb_file()
|
||||||
@ -92,11 +95,6 @@ def importData(database, filename, cb=None):
|
|||||||
errmsg = _("%s could not be opened\n") % filename
|
errmsg = _("%s could not be opened\n") % filename
|
||||||
ErrorDialog(errmsg,str(msg))
|
ErrorDialog(errmsg,str(msg))
|
||||||
return
|
return
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# For a description of the file format see
|
# For a description of the file format see
|
||||||
|
@ -31,6 +31,14 @@ import re
|
|||||||
import time
|
import time
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".ImportVCard")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GTK/GNOME Modules
|
# GTK/GNOME Modules
|
||||||
@ -61,11 +69,6 @@ def importData(database, filename, cb=None):
|
|||||||
except IOError,msg:
|
except IOError,msg:
|
||||||
ErrorDialog(_("%s could not be opened\n") % filename,str(msg))
|
ErrorDialog(_("%s could not be opened\n") % filename,str(msg))
|
||||||
return
|
return
|
||||||
except:
|
|
||||||
ErrorDialog(_("%s could not be opened\n") % filename)
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
status = g.parse_vCard_file()
|
status = g.parse_vCard_file()
|
||||||
@ -73,11 +76,6 @@ def importData(database, filename, cb=None):
|
|||||||
errmsg = _("%s could not be opened\n") % filename
|
errmsg = _("%s could not be opened\n") % filename
|
||||||
ErrorDialog(errmsg,str(msg))
|
ErrorDialog(errmsg,str(msg))
|
||||||
return
|
return
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -46,7 +46,6 @@ pkgdata_PYTHON = \
|
|||||||
Summary.py\
|
Summary.py\
|
||||||
TimeLine.py\
|
TimeLine.py\
|
||||||
Verify.py\
|
Verify.py\
|
||||||
WebPage.py\
|
|
||||||
WriteFtree.py\
|
WriteFtree.py\
|
||||||
WritePkg.py\
|
WritePkg.py\
|
||||||
WriteCD.py\
|
WriteCD.py\
|
||||||
|
@ -35,11 +35,23 @@ import time
|
|||||||
import locale
|
import locale
|
||||||
import shutil
|
import shutil
|
||||||
import codecs
|
import codecs
|
||||||
import sets
|
|
||||||
import tarfile
|
import tarfile
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
|
|
||||||
|
try:
|
||||||
|
set()
|
||||||
|
except:
|
||||||
|
from sets import Set as set
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".WebPage")
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GNOME/gtk
|
# GNOME/gtk
|
||||||
@ -2148,7 +2160,7 @@ class WebReport(Report.Report):
|
|||||||
ind_list = self.database.get_person_handles(sort_handles=False)
|
ind_list = self.database.get_person_handles(sort_handles=False)
|
||||||
self.progress.set_pass(_('Filtering'),1)
|
self.progress.set_pass(_('Filtering'),1)
|
||||||
ind_list = self.filter.apply(self.database,ind_list)
|
ind_list = self.filter.apply(self.database,ind_list)
|
||||||
restrict_list = sets.Set()
|
restrict_list = set()
|
||||||
|
|
||||||
# if private records need to be filtered out, strip out any person
|
# if private records need to be filtered out, strip out any person
|
||||||
# that has the private flag set.
|
# that has the private flag set.
|
||||||
@ -2722,7 +2734,7 @@ class WebReportDialog(Report.ReportDialog):
|
|||||||
ErrorDialog(m1,m2)
|
ErrorDialog(m1,m2)
|
||||||
|
|
||||||
def sort_people(db,handle_list):
|
def sort_people(db,handle_list):
|
||||||
flist = sets.Set(handle_list)
|
flist = set(handle_list)
|
||||||
|
|
||||||
sname_sub = {}
|
sname_sub = {}
|
||||||
sortnames = {}
|
sortnames = {}
|
||||||
@ -2764,18 +2776,15 @@ def sort_people(db,handle_list):
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
def cl_report(database,name,category,options_str_dict):
|
def cl_report(database,name,category,options_str_dict):
|
||||||
|
|
||||||
clr = Report.CommandLineReport(database,name,category,WebReportOptions,options_str_dict)
|
clr = Report.CommandLineReport(database,name,category,WebReportOptions,
|
||||||
|
options_str_dict)
|
||||||
|
|
||||||
# Exit here if show option was given
|
# Exit here if show option was given
|
||||||
if clr.show:
|
if clr.show:
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
|
||||||
MyReport = WebReport(database,clr.person,clr.option_class)
|
MyReport = WebReport(database,clr.person,clr.option_class)
|
||||||
MyReport.write_report()
|
MyReport.write_report()
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -32,6 +32,14 @@ import os
|
|||||||
import tarfile
|
import tarfile
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".ReadPkg")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GNOME/GTK+ modules
|
# GNOME/GTK+ modules
|
||||||
@ -86,12 +94,8 @@ def impData(database, name,cb=None,cl=0):
|
|||||||
|
|
||||||
imp_db_name = os.path.join(tmpdir_path,const.xmlFile)
|
imp_db_name = os.path.join(tmpdir_path,const.xmlFile)
|
||||||
|
|
||||||
try:
|
|
||||||
importer = gramps_db_reader_factory(const.app_gramps_xml)
|
importer = gramps_db_reader_factory(const.app_gramps_xml)
|
||||||
importer(database,imp_db_name,cb)
|
importer(database,imp_db_name,cb)
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
|
|
||||||
# Clean up tempdir after ourselves
|
# Clean up tempdir after ourselves
|
||||||
# THIS HAS BEEN CHANGED, because now we want to keep images
|
# THIS HAS BEEN CHANGED, because now we want to keep images
|
||||||
|
@ -31,6 +31,14 @@ import os
|
|||||||
import cStringIO
|
import cStringIO
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".Rebuild")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# gtk modules
|
# gtk modules
|
||||||
@ -59,7 +67,6 @@ class Rebuild(Tool.Tool):
|
|||||||
def __init__(self,db,person,options_class,name,callback=None,parent=None):
|
def __init__(self,db,person,options_class,name,callback=None,parent=None):
|
||||||
Tool.Tool.__init__(self,db,person,options_class,name)
|
Tool.Tool.__init__(self,db,person,options_class,name)
|
||||||
|
|
||||||
try:
|
|
||||||
if db.readonly:
|
if db.readonly:
|
||||||
# TODO: split plugin in a check and repair part to support
|
# TODO: split plugin in a check and repair part to support
|
||||||
# checking of a read only database
|
# checking of a read only database
|
||||||
@ -82,9 +89,6 @@ class Rebuild(Tool.Tool):
|
|||||||
db.rebuild_secondary(self.empty)
|
db.rebuild_secondary(self.empty)
|
||||||
print "All secondary indices have been rebuilt."
|
print "All secondary indices have been rebuilt."
|
||||||
db.enable_signals()
|
db.enable_signals()
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
|
|
||||||
def empty(self):
|
def empty(self):
|
||||||
pass
|
pass
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -31,6 +31,14 @@ import os
|
|||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".WriteCD")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GNOME/GTK modules
|
# GNOME/GTK modules
|
||||||
@ -66,12 +74,8 @@ _title_string = _("Export to CD")
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def writeData(database,filename,person,option_box=None):
|
def writeData(database,filename,person,option_box=None):
|
||||||
ret = 0
|
ret = 0
|
||||||
try:
|
|
||||||
writer = PackageWriter(database,filename)
|
writer = PackageWriter(database,filename)
|
||||||
ret = writer.export()
|
ret = writer.export()
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -31,6 +31,14 @@ import os
|
|||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".WriteFtree")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GNOME/GTK modules
|
# GNOME/GTK modules
|
||||||
@ -56,12 +64,8 @@ from QuestionDialog import ErrorDialog
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def writeData(database,filename,person,option_box):
|
def writeData(database,filename,person,option_box):
|
||||||
ret = 0
|
ret = 0
|
||||||
try:
|
|
||||||
writer = FtreeWriter(database,person,0,filename,option_box)
|
writer = FtreeWriter(database,person,0,filename,option_box)
|
||||||
ret = writer.export_data()
|
ret = writer.export_data()
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
class FtreeWriterOptionBox:
|
class FtreeWriterOptionBox:
|
||||||
|
@ -38,6 +38,14 @@ from gettext import gettext as _
|
|||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".WriteGeneWeb")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
@ -580,12 +588,8 @@ class GeneWebWriter:
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def exportData(database,filename,person,option_box):
|
def exportData(database,filename,person,option_box):
|
||||||
ret = 0
|
ret = 0
|
||||||
try:
|
|
||||||
gw = GeneWebWriter(database,person,0,filename,option_box)
|
gw = GeneWebWriter(database,person,0,filename,option_box)
|
||||||
ret = gw.export_data()
|
ret = gw.export_data()
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -33,6 +33,14 @@ import tarfile
|
|||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Set up logging
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(".WritePkg")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GNOME/GTK modules
|
# GNOME/GTK modules
|
||||||
@ -57,13 +65,8 @@ from QuestionDialog import MissingMediaDialog
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def writeData(database,filename,person,callback=None):
|
def writeData(database,filename,person,callback=None):
|
||||||
ret = 0
|
ret = 0
|
||||||
try:
|
|
||||||
writer = PackageWriter(database,filename,callback)
|
writer = PackageWriter(database,filename,callback)
|
||||||
ret = writer.export()
|
ret = writer.export()
|
||||||
|
|
||||||
except:
|
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user