Use pgi only when gi is not available

- Write a convenience utility to handle the import process.
This commit is contained in:
Sunil Mohan Adapa committed 2015-11-16 09:55:20 +05:30
1 parent 608897b9ec
commit cc858bbd6a
4 files changed
+44 -13

No files matched your search

+2 -3
View File
@@ -20,9 +20,8 @@ from django.core import validators
from django.utils.translation import ugettext_lazy as _
from plinth import network
import pgi
pgi.require_version('NM', '1.0')
from pgi.repository import NM as nm
from plinth.utils import import_from_gi
nm = import_from_gi('NM', '1.0')
def _get_interface_choices(device_type):