From f56e4ae112a9e775be2657d4b99d8842cb1cbbac Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Fri, 16 May 2008 10:07:45 +0000 Subject: [PATCH] correctly report when libzypp cannot lock due to error instead of allready existing lock. (bnc#300103) --- src/zypper.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/zypper.cc b/src/zypper.cc index 9b6de60..7c56711 100644 --- a/src/zypper.cc +++ b/src/zypper.cc @@ -1881,7 +1881,7 @@ void Zypper::processCommandOptions() God = zypp::getZYpp(); } - catch (Exception & excpt_r) { + catch (ZYppFactoryException & excpt_r) { ZYPP_CAUGHT (excpt_r); ERR << "A ZYpp transaction is already in progress." << endl; out().error( @@ -1893,6 +1893,12 @@ void Zypper::processCommandOptions() setExitCode(ZYPPER_EXIT_ERR_ZYPP); throw (ExitRequestException("ZYpp locked")); } + catch (Exception & excpt_r) { + ZYPP_CAUGHT (excpt_r); + out().error(excpt_r.msg()); + setExitCode(ZYPPER_EXIT_ERR_ZYPP); + throw (ExitRequestException("ZYpp locked")); + } } MIL << "Done " << endl; -- 2.7.4