Skip to content

Commit

Permalink
one more gi import warning to silence
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 8, 2023
1 parent abc5902 commit 36b1573
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions xpra/client/mixins/network_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from collections.abc import Callable
from gi.repository import GLib

from xpra.os_util import POSIX
from xpra.os_util import POSIX, gi_import
from xpra.util.types import typedict
from xpra.util.str_fn import csv
from xpra.util.env import envint, envbool
Expand Down Expand Up @@ -52,9 +52,7 @@ def get_NM_adapter_type(device_name) -> str:
log("get_NM_adapter_type() no main loop")
return ""
try:
import gi
gi.require_version("NM", "1.0")
from gi.repository import NM
NM = gi_import("NM", "1.0")
except (ImportError, ValueError):
log("get_NM_adapter_type() no network-manager bindings")
return ""
Expand Down

0 comments on commit 36b1573

Please sign in to comment.