From 4d66fbe8c302236cd2e4fe0582bca3b82cd06f11 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Mon, 16 Mar 2015 14:15:47 +0000 Subject: [PATCH] Remove fallback to md5 module All supported versions now include the hashlib module. --- gramps/gui/thumbnails.py | 5 +---- gramps/plugins/docgen/odfdoc.py | 5 +---- gramps/plugins/tool/verify.py | 5 +---- gramps/plugins/webreport/narrativeweb.py | 5 +---- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/gramps/gui/thumbnails.py b/gramps/gui/thumbnails.py index 74d0296fb..7cb93abed 100644 --- a/gramps/gui/thumbnails.py +++ b/gramps/gui/thumbnails.py @@ -29,10 +29,7 @@ Handles generation and access to thumbnails used in GRAMPS. #------------------------------------------------------------------------- import os import logging -try: - from hashlib import md5 -except ImportError: - from md5 import md5 +from hashlib import md5 #------------------------------------------------------------------------- # diff --git a/gramps/plugins/docgen/odfdoc.py b/gramps/plugins/docgen/odfdoc.py index 0d8c7c6c4..6257f29dd 100644 --- a/gramps/plugins/docgen/odfdoc.py +++ b/gramps/plugins/docgen/odfdoc.py @@ -62,10 +62,7 @@ ODFDoc : used to generate Open Office Document # #------------------------------------------------------------------------- import os -try: - from hashlib import md5 -except ImportError: - from md5 import md5 +from hashlib import md5 import zipfile import time from io import StringIO diff --git a/gramps/plugins/tool/verify.py b/gramps/plugins/tool/verify.py index 784a41949..fea88721e 100644 --- a/gramps/plugins/tool/verify.py +++ b/gramps/plugins/tool/verify.py @@ -34,10 +34,7 @@ This is the research tool, not the low-level data ingerity check. import os import pickle -try: - from hashlib import md5 -except ImportError: - from md5 import md5 +from hashlib import md5 from gramps.gen.errors import WindowActiveError #------------------------------------------------------------------------ diff --git a/gramps/plugins/webreport/narrativeweb.py b/gramps/plugins/webreport/narrativeweb.py index f6f7b7a0b..a57e9d3b2 100644 --- a/gramps/plugins/webreport/narrativeweb.py +++ b/gramps/plugins/webreport/narrativeweb.py @@ -71,10 +71,7 @@ import os import sys import re import copy -try: - from hashlib import md5 -except ImportError: - from md5 import md5 +from hashlib import md5 import time, datetime import shutil import codecs