From: Michael Andres Date: Tue, 27 Aug 2013 15:25:03 +0000 (+0200) Subject: Fix exception thrown if no config file exists, that's no error. X-Git-Tag: upstream/1.11.11~161 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84fe69b47d86518294ae01b959067d133771d437;p=platform%2Fupstream%2Fzypper.git Fix exception thrown if no config file exists, that's no error. --- diff --git a/src/utils/Augeas.cc b/src/utils/Augeas.cc index 3320346..4950b16 100644 --- a/src/utils/Augeas.cc +++ b/src/utils/Augeas.cc @@ -93,16 +93,10 @@ Augeas::Augeas(const string & file) } } - if (!_got_global_zypper_conf && !_got_user_zypper_conf) + if (!_got_global_zypper_conf && !_got_user_zypper_conf && !error.empty() ) { - if (error.empty()) - ZYPP_THROW(Exception( - _("No configuration file exists or could be parsed."))); - else - { - string msg = _("Error parsing zypper.conf:") + string("\n") + error; - ZYPP_THROW(Exception(msg)); - } + string msg = _("Error parsing zypper.conf:") + string("\n") + error; + ZYPP_THROW(Exception(msg)); } MIL << "Done reading conf files:" << endl;