diff options
Diffstat (limited to 'src/leap/bitmask/util')
-rw-r--r-- | src/leap/bitmask/util/polkit_agent.py | 24 | ||||
-rw-r--r-- | src/leap/bitmask/util/tests/test_is_release_version.py | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/leap/bitmask/util/polkit_agent.py b/src/leap/bitmask/util/polkit_agent.py index a4650273..6fda2f88 100644 --- a/src/leap/bitmask/util/polkit_agent.py +++ b/src/leap/bitmask/util/polkit_agent.py @@ -24,24 +24,24 @@ import daemon logger = logging.getLogger(__name__) -BASE_PATH = "/usr/lib/policykit-1-gnome/"\ - + "polkit-%s-authentication-agent-1" - -GNOME_PATH = BASE_PATH % ("gnome",) -KDE_PATH = BASE_PATH % ("kde",) +AUTH_FILE = "polkit-%s-authentication-agent-1" +BASE_PATH_GNO = "/usr/lib/policykit-1-gnome/" +BASE_PATH_KDE = "/usr/lib/kde4/libexec/" +GNO_PATH = BASE_PATH_GNO + AUTH_FILE % ("gnome",) +KDE_PATH = BASE_PATH_KDE + AUTH_FILE % ("kde",) def _launch_agent(): logger.debug('Launching polkit auth agent') - print "launching polkit" try: - subprocess.call(GNOME_PATH) + subprocess.call(GNO_PATH) except Exception as exc: - try: - subprocess.call(KDE_PATH) - except Exception as exc: - logger.error('Exception while running polkit authentication agent ' - '%s' % (exc,)) + logger.error('Exception while running polkit authentication agent ' + '%s' % (exc,)) + # XXX fix KDE launch. See: #3755 + #try: + #subprocess.call(KDE_PATH) + #except Exception as exc: def launch(): diff --git a/src/leap/bitmask/util/tests/test_is_release_version.py b/src/leap/bitmask/util/tests/test_is_release_version.py index 088ec66d..0a0093da 100644 --- a/src/leap/bitmask/util/tests/test_is_release_version.py +++ b/src/leap/bitmask/util/tests/test_is_release_version.py @@ -19,7 +19,7 @@ tests for _is_release_version function """ import unittest -from leap.bitmask.util import _is_release_version as is_release_version +from leap.bitmask import _is_release_version as is_release_version from leap.common.testing.basetest import BaseLeapTest |