Skip to content

Commit

Permalink
Python Bindings: care for python3.3+ use of ElementTree
Browse files Browse the repository at this point in the history
Fedora 33 is using Python 3.9 and no longer has cElementTree.
Which was depracated in v3.3, thanks GB.

https://docs.python.org/3/library/xml.etree.elementtree.html
  • Loading branch information
Bill Meek committed Jun 22, 2020
1 parent d3719e6 commit d7c0c5d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mythtv/bindings/python/MythTV/dataheap.py
Expand Up @@ -15,7 +15,13 @@

import re
import locale
import xml.etree.cElementTree as etree

# TODO: if Python 3.3+ is in use by all distributions, use ElementTree only.
try:
import xml.etree.cElementTree as etree
except ImportError:
import xml.etree.ElementTree as etree

from datetime import date, time

_default_datetime = datetime(1900,1,1, tzinfo=datetime.UTCTZ())
Expand Down

0 comments on commit d7c0c5d

Please sign in to comment.