3428: When running with pythonw.exe, Windows may crash if you write to stdout
svn: r14396
This commit is contained in:
@@ -40,7 +40,7 @@ import codecs
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import logging
|
||||
log = logging.getLogger(".ExportCSV")
|
||||
LOG = logging.getLogger(".ExportCSV")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -309,8 +309,8 @@ class CSVWriter(object):
|
||||
if self.include_children:
|
||||
self.total += len(self.flist)
|
||||
########################
|
||||
print "Possible people to export:", len(self.plist)
|
||||
print "Possible families to export:", len(self.flist)
|
||||
LOG.debug("Possible people to export: %s", len(self.plist))
|
||||
LOG.debug("Possible families to export: %s", len(self.flist))
|
||||
########################### sort:
|
||||
sortorder = []
|
||||
for key in self.plist:
|
||||
|
@@ -41,7 +41,7 @@ import time
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import logging
|
||||
log = logging.getLogger(".ExportDjango")
|
||||
LOG = logging.getLogger(".ExportDjango")
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
@@ -86,7 +86,7 @@ def export_all(database, filename, option_box=None, callback=None):
|
||||
dji.clear_tables("primary", "secondary", "ref")
|
||||
|
||||
for step in [0, 1]:
|
||||
print >> sys.stderr, "Exporting Step %d..." % (step + 1)
|
||||
LOG.debug("Exporting Step %d..." % (step + 1))
|
||||
# ---------------------------------
|
||||
# Person
|
||||
# ---------------------------------
|
||||
@@ -185,7 +185,7 @@ def export_all(database, filename, option_box=None, callback=None):
|
||||
|
||||
total_time = time.time() - start
|
||||
msg = ngettext('Export Complete: %d second','Export Complete: %d seconds', total_time ) % total_time
|
||||
print >> sys.stderr, msg
|
||||
LOG.debug(msg)
|
||||
return True
|
||||
|
||||
class NoFilenameOptions(ExportOptions.WriterOptionBox):
|
||||
|
@@ -149,7 +149,7 @@ class GrampsXmlWriter(UpdateCallback):
|
||||
else:
|
||||
g = open(filename,"w")
|
||||
except IOError,msg:
|
||||
print str(msg)
|
||||
LOG.warn(str(msg))
|
||||
raise DbWriteFailure((_('Failure writing %s') % filename,
|
||||
str(msg)))
|
||||
return 0
|
||||
|
Reference in New Issue
Block a user