X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=check_dups.py;h=25c2936da800999cf5e84b9a1e2b0e6c4ec83bd6;hb=865ee60d6e5813866423b4481ff5ed3411a1a7fe;hp=94ae3f0a51731ad42c771db98bbaf137b69f9e61;hpb=9faa13f6f8199790cf01533e857c593520559649;p=bookmarks_db.git diff --git a/check_dups.py b/check_dups.py index 94ae3f0..25c2936 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. @@ -69,7 +69,6 @@ def run(): if report_stats: print("Ok") - dup_dict = {} for object_no in range(objects): @@ -77,12 +76,11 @@ 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 - if log_filename: log_file.close()