Skip to content

Commit

Permalink
Merge c349f00 into 764002f
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Aug 14, 2018
2 parents 764002f + c349f00 commit e37f67b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
7 changes: 7 additions & 0 deletions package/autoyast2.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Aug 14 09:47:25 CEST 2018 - schubi@suse.de

- AY configuration module: Report XML errors while reading an
AY configuration file (bsc#1098794)
- 4.0.58

-------------------------------------------------------------------
Thu Jun 28 14:29:25 CEST 2018 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/autoyast2.spec
Expand Up @@ -22,7 +22,7 @@
%endif

Name: autoyast2
Version: 4.0.57
Version: 4.0.58
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
9 changes: 6 additions & 3 deletions src/modules/Profile.rb
Expand Up @@ -7,6 +7,7 @@
#
# $Id$
require "yast"
require "yast2/popup"

module Yast
class ProfileClass < Module
Expand Down Expand Up @@ -745,15 +746,17 @@ def ReadXML(file)
@current = XML.XMLToYCPFile(file)
end

if @current != {} && Builtins.size(@current) == 0
xml_error = XML.XMLError
if xml_error && !xml_error.empty?
# autoyast has read the autoyast configuration file but something went wrong
message = _(
"The XML parser reported an error while parsing the autoyast profile. The error message is:\n"
)
message = Ops.add(message, XML.XMLError)
Popup.Error(message)
message += xml_error
Yast2::Popup.show(message, headline: :error)
return false
end

Import(@current)
true
end
Expand Down

0 comments on commit e37f67b

Please sign in to comment.