Mailinglist Archive: yast-devel (233 mails)

< Previous Next >
Re: [yast-devel] almost-fixing zero eulas
  • From: Klaus Kaempf <kkaempf@xxxxxxx>
  • Date: Mon, 19 Oct 2009 14:56:35 +0200
  • Message-id: <20091019125635.GB6230@xxxxxxxxxxxxx>
* Martin Vidner <mvidner@xxxxxxx> [Oct 16. 2009 15:12]:
Here is a patch that I am not sure is right, so it is not committed.
If I use this, it is still broken, and every controller says:

You must accept all EULAs before using this product!
Accept End User Licence Agreement
All licenses have already been accepted
OK
--
Martin Vidner, YaST developer
http://en.opensuse.org/User:Mvidner

Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu

From a4d3a161f6691e1d50bc311c4cea6d86fc8f6a2e Mon Sep 17 00:00:00 2001
From: Martin Vidner <mvidner@xxxxxxx>
Date: Fri, 16 Oct 2009 15:07:14 +0200
Subject: [PATCH] Attempting to fix the eula code if the config specifies no
licenses.

Like
echo "licenses:" >/etc/YaST2/eula.yml
---
plugins/eulas/app/models/license.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/eulas/app/models/license.rb
b/plugins/eulas/app/models/license.rb
index fe2003b..be94037 100644
--- a/plugins/eulas/app/models/license.rb
+++ b/plugins/eulas/app/models/license.rb
@@ -71,7 +71,7 @@ class License
def self.license_names
config = YaST::ConfigFile.new(:eula)
begin
- config["licenses"]
+ config["licenses"] || []
rescue Exception => e
raise CorruptedFileException.new config.path
end

Hmm, the begin..rescue..end encloses accessing the config hash only. I
guess it should catch YaST::ConfigFile.new exceptions also ?!

Klaus

---
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG N├╝rnberg)

--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References