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
This commit is contained in:
parent
386929e84b
commit
dd6fe58475
@ -335,11 +335,19 @@ const AuthenticationAgent = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
enable: function() {
|
enable: function() {
|
||||||
this._native.register();
|
try {
|
||||||
|
this._native.register();
|
||||||
|
} catch(e) {
|
||||||
|
log('Failed to register AuthenticationAgent');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
disable: function() {
|
disable: function() {
|
||||||
this._native.unregister();
|
try {
|
||||||
|
this._native.unregister();
|
||||||
|
} catch(e) {
|
||||||
|
log('Failed to unregister AuthenticationAgent');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onInitiate: function(nativeAgent, actionId, message, iconName, cookie, userNames) {
|
_onInitiate: function(nativeAgent, actionId, message, iconName, cookie, userNames) {
|
||||||
|
Loading…
Reference in New Issue
Block a user