[jhbuild/pre-3-cleanup] Remove ElementTree import fallback
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/pre-3-cleanup] Remove ElementTree import fallback
- Date: Sat, 21 Sep 2019 21:59:42 +0000 (UTC)
commit 998ff7d2d6273a11ae6fe6856ce88bea0bb1150e
Author: Christoph Reiter <reiter christoph gmail com>
Date: Sat Sep 21 22:16:12 2019 +0200
Remove ElementTree import fallback
It's in the stdlib since 2.5
jhbuild/commands/goalreport.py | 5 +----
jhbuild/utils/packagedb.py | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/jhbuild/commands/goalreport.py b/jhbuild/commands/goalreport.py
index 53a61b64..21fe184b 100644
--- a/jhbuild/commands/goalreport.py
+++ b/jhbuild/commands/goalreport.py
@@ -34,10 +34,7 @@ try:
except ImportError:
from StringIO import StringIO
-try:
- import elementtree.ElementTree as ET
-except ImportError:
- import xml.etree.ElementTree as ET
+import xml.etree.ElementTree as ET
try:
import curses
diff --git a/jhbuild/utils/packagedb.py b/jhbuild/utils/packagedb.py
index 315f56fa..c7b34c3c 100644
--- a/jhbuild/utils/packagedb.py
+++ b/jhbuild/utils/packagedb.py
@@ -27,10 +27,7 @@ try:
except ImportError:
import md5 as hashlib
-try:
- import xml.etree.ElementTree as ET
-except ImportError:
- import elementtree.ElementTree as ET
+import xml.etree.ElementTree as ET
from jhbuild.utils import fileutils
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]