Mailinglist Archive: yast-commit (1771 mails)

< Previous Next >
[yast-commit] <rest-service> network : service.rb - catch exceptions
  • From: Ladislav Slezak <lslezak@xxxxxxxxxx>
  • Date: Mon, 24 Aug 2009 14:10:09 +0200
  • Message-id: <E1MiTqI-0006aX-Rk@xxxxxxxxxxxxxxxx>
ref: refs/heads/network
commit 1a456b37d160ae603431cd56e1617330047e6a90
Author: Ladislav Slezak <lslezak@xxxxxxxxxx>
Date: Mon Aug 24 10:20:10 2009 +0200

service.rb - catch exceptions
---
plugins/services/app/models/service.rb | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/plugins/services/app/models/service.rb
b/plugins/services/app/models/service.rb
index 2904bc0..1632c6a 100644
--- a/plugins/services/app/models/service.rb
+++ b/plugins/services/app/models/service.rb
@@ -38,7 +38,8 @@ class Service
"runlevel" => [ "i", rl == "S" ? -1 : rl.to_i ],
"read_status" => [ "b", read_status]
}
- yapi_ret = YastService.Call("YaPI::SERVICES::Read", params)
+
+ yapi_ret = YastService.Call("YaPI::SERVICES::Read", params) rescue nil

if yapi_ret.nil?
raise "Can't get services list"
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages