Skip to content

Commit fb44d38

Browse files
committed
Make python-six an optional dependency
In Ubuntu and Debian we no longer ship Python 2.7, so the translation module is an unnecessary dependency. In Python 3 the text type is always 'str', so it is not needed. Make the import optional, so that it can still support Python 2.7 on RHEL and others that ship it.
1 parent 93c9af4 commit fb44d38

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

bindings/python/gi/overrides/Modulemd.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616

1717
import functools
1818

19-
from six import text_type
19+
try:
20+
from six import text_type
21+
except ImportError:
22+
text_type = str
2023
from gi.repository import GLib
2124

2225
import datetime

0 commit comments

Comments
 (0)