summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/util/polkit_agent.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-09-04 18:13:19 +0200
committerKali Kaneko <kali@leap.se>2013-09-05 20:43:24 +0200
commitca1c9e01fecd74150399d5829d3255337be8f10a (patch)
tree64294e13f0d56263c5d73ab7732c8d819dcf7f6e /src/leap/bitmask/util/polkit_agent.py
parentf688bae3beb8b011c643e2d17c62618cfdc89f6c (diff)
Fix invocation of the helper polkit-agent launcher.
Otherwise, we are dumped into a nasty console.
Diffstat (limited to 'src/leap/bitmask/util/polkit_agent.py')
-rw-r--r--src/leap/bitmask/util/polkit_agent.py24
1 files changed, 12 insertions, 12 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():