xmleditor: Fix the gtksource version checking

Previous commit was incomplete
This commit is contained in:
Cole Robinson 2019-06-18 10:39:15 -04:00
parent e4b4834a58
commit 267f226134
1 changed files with 4 additions and 2 deletions

View File

@ -4,10 +4,12 @@
# pylint: disable=wrong-import-order,ungrouped-imports
import gi
from virtinst import log
# We can use either gtksourceview3 or gtksourceview4
try:
gi.require_version("GtkSource", "4.0")
log.debug("Using GtkSource 4.0")
gi.require_version("GtkSource", "4")
log.debug("Using GtkSource 4")
except ValueError:
gi.require_version("GtkSource", "3.0")
log.debug("Using GtkSource 3.0")