[gnome-shell] polKitAgent: Don't crash when we cannot enable/disable the auth agent
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] polKitAgent: Don't crash when we cannot enable/disable the auth agent
- Date: Tue, 19 Feb 2013 16:26:03 +0000 (UTC)
commit dd6fe584754785f591e1c1733c71d7f362ab3690
Author: Adel Gadllah <adel gadllah gmail com>
Date: Sun Nov 4 11:53:22 2012 +0100
polKitAgent: Don't crash when we cannot enable/disable the auth agent
This makes it easier to run with jhbuild.
https://bugzilla.gnome.org/show_bug.cgi?id=687556
js/ui/components/polkitAgent.js | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js
index d38dcdf..929b43e 100644
--- a/js/ui/components/polkitAgent.js
+++ b/js/ui/components/polkitAgent.js
@@ -335,11 +335,19 @@ const AuthenticationAgent = new Lang.Class({
},
enable: function() {
- this._native.register();
+ try {
+ this._native.register();
+ } catch(e) {
+ log('Failed to register AuthenticationAgent');
+ }
},
disable: function() {
- this._native.unregister();
+ try {
+ this._native.unregister();
+ } catch(e) {
+ log('Failed to unregister AuthenticationAgent');
+ }
},
_onInitiate: function(nativeAgent, actionId, message, iconName, cookie, userNames) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]