examples/python: fix "import gi" in example

Otherwise there is a warning:

  from gi.repository import GLib, NM
  __main__:1: PyGIWarning: NM was imported without specifying a version first. Use gi.require_version(NM, 1.0) before import to ensure that the right version gets loaded.
This commit is contained in:
Thomas Haller
2016-11-16 11:50:28 +01:00
parent 167bddb333
commit 2837da9b30

View File

@@ -21,6 +21,8 @@
# This example lists all devices, both real and placeholder ones
import gi
gi.require_version('NM', '1.0')
from gi.repository import GLib, NM
if __name__ == "__main__":