-#! /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.
sys.exit(1)
if log_filename:
- log_file = open(log_filename, 'w')
+ log_file = open(log_filename, 'wt')
from storage import storage
storage = storage()
if report_stats:
print("Ok")
-
dup_dict = {}
for object_no in range(objects):
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()