From: Oleg Broytman Date: Thu, 27 Dec 2007 19:37:42 +0000 (+0000) Subject: Log dups either to the logfile or to stdout but not to both. X-Git-Tag: v4.5.3~240 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=f5e83d99fbcd0416e784f25ab3076c25318f235c;p=bookmarks_db.git Log dups either to the logfile or to stdout but not to both. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@136 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/check_dups.py b/check_dups.py index 5da7902..16a8c43 100755 --- a/check_dups.py +++ b/check_dups.py @@ -2,10 +2,9 @@ """ Check duplicate URLs in the bookmarks database - Written by BroytMann, Jun 2000 - Aug 2002. Copyright (C) 2000-2002 PhiloSoft Design + Written by BroytMann. Copyright (C) 2000-2007 PhiloSoft Design """ - import sys @@ -13,11 +12,11 @@ log_file = None def report_dup(href, object_no): s = "Duplicate URL: %s (first at rec. %d)" % (href, object_no) - print s if log_file: log_file.write("%s\n" % s) - + else: + print s def run(): @@ -39,7 +38,7 @@ def run(): pass if report_stats: - print "BroytMann check_dups, Copyright (C) 2000 PhiloSoft Design" + print "BroytMann check_dups, Copyright (C) 2000-2007 PhiloSoft Design" if args: sys.stderr.write("check_urls: too many arguments\n")