We use python 2.5 features in several places and we have the
'Requires: python >= 2.5' in our RPM spec file. This means that
we do not have to check whether hashlib and xml.etree exist, we can
just use them instead, because they are part of python 2.5.
Similarly, remove the 'with_statement' importing, because 'with'
was added in 2.5.
Change-Id: I14cc9741f66f8d397744b1b37f9a55dc47877a9c
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
# with this program; if not, write to the Free Software Foundation, Inc., 59
# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-from __future__ import with_statement
import os
import sys
import tempfile
import subprocess
import platform
import rpmmisc
+from hashlib import md5
+import sqlite3 as sqlite
-try:
- from hashlib import md5
-except ImportError:
- from md5 import md5
-
-try:
- import sqlite3 as sqlite
-except ImportError:
- import sqlite
-
-try:
- from xml.etree import cElementTree
-except ImportError:
- import cElementTree
+from xml.etree import cElementTree
xmlparse = cElementTree.parse
from errors import *