X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=check_dups.py;h=df79df86cbe1aecea85ef89601b097c06b8c4225;hb=fbb34ad74643bbc69d141e26e105bcef3cdbc62c;hp=7fca79a08f009e8fb476afad24e05fd2360e149c;hpb=d7a67c44edee1994505e3bf501e6af63ffd1ef36;p=bookmarks_db.git diff --git a/check_dups.py b/check_dups.py index 7fca79a..df79df8 100755 --- a/check_dups.py +++ b/check_dups.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 """Check duplicate URLs in the bookmarks database This file is a part of Bookmarks database and Internet robot. @@ -52,7 +52,7 @@ def run(): sys.exit(1) if log_filename: - log_file = open(log_filename, 'w') + log_file = open(log_filename, 'wt') from storage import storage storage = storage() @@ -76,7 +76,7 @@ def run(): if object.isBookmark: href = object.href - if dup_dict.has_key(href): + if href in dup_dict: report_dup(href, dup_dict[href]) else: dup_dict[href] = object_no