[jhbuild/pre-3-cleanup] Assume minidom is always available
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/pre-3-cleanup] Assume minidom is always available
- Date: Sat, 21 Sep 2019 22:00:02 +0000 (UTC)
commit e6a3b308c4a732a417db88c5432abfc314216fea
Author: Christoph Reiter <reiter christoph gmail com>
Date: Sat Sep 21 22:54:39 2019 +0200
Assume minidom is always available
It's in the stdlib, and used in other places unconditionally anyway.
jhbuild/moduleset.py | 9 ++-------
jhbuild/utils/httpcache.py | 6 +-----
2 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/jhbuild/moduleset.py b/jhbuild/moduleset.py
index 3aa3578d..d082c8bb 100644
--- a/jhbuild/moduleset.py
+++ b/jhbuild/moduleset.py
@@ -23,16 +23,11 @@ import os
import sys
import urlparse
import logging
+import xml.dom.minidom
+import xml.parsers.expat
from jhbuild.errors import UsageError, FatalError, \
CommandError, UndefinedRepositoryError
-
-try:
- import xml.dom.minidom
- import xml.parsers.expat
-except ImportError:
- raise FatalError(_('Python XML packages are required but could not be found'))
-
from jhbuild import modtypes
from jhbuild.versioncontrol import get_repo_type
from jhbuild.utils import httpcache
diff --git a/jhbuild/utils/httpcache.py b/jhbuild/utils/httpcache.py
index 0a0c818b..21308eb6 100644
--- a/jhbuild/utils/httpcache.py
+++ b/jhbuild/utils/httpcache.py
@@ -36,11 +36,7 @@ import time
from email.utils import parsedate_tz, mktime_tz
import StringIO
import gzip
-
-try:
- import xml.dom.minidom
-except ImportError:
- raise SystemExit(_('Python XML packages are required but could not be found'))
+import xml.dom.minidom
def _parse_isotime(string):
if string[-1] != 'Z':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]