Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11622 - in /trunk/libzypp/zypp/media: MediaAria2c.cc MediaCurl.cc
  • From: dmacvicar@xxxxxxxxxxxxxxxx
  • Date: Fri, 07 Nov 2008 12:46:24 -0000
  • Message-id: <20081107124624.649DF33A26@xxxxxxxxxxxxxxxx>
Author: dmacvicar
Date: Fri Nov 7 13:46:24 2008
New Revision: 11622

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11622&view=rev
Log:
thanks Jano, this is much more clean

Modified:
trunk/libzypp/zypp/media/MediaAria2c.cc
trunk/libzypp/zypp/media/MediaCurl.cc

Modified: trunk/libzypp/zypp/media/MediaAria2c.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/media/MediaAria2c.cc?rev=11622&r1=11621&r2=11622&view=diff
==============================================================================
--- trunk/libzypp/zypp/media/MediaAria2c.cc (original)
+++ trunk/libzypp/zypp/media/MediaAria2c.cc Fri Nov 7 13:46:24 2008
@@ -85,16 +85,7 @@
// agent string.
// The target could be not initialized, and then this information
// is not available.
- Target_Ptr target;
- // FIXME this has to go away as soon as the target
- // does not throw when not initialized.
- try {
- target = zypp::getZYpp()->target();
- }
- catch ( const Exception &e )
- {
- // nothing to do
- }
+ Target_Ptr target = zypp::getZYpp()->getTarget();

static const std::string _value(
str::form(
@@ -110,16 +101,7 @@
// agent string.
// The target could be not initialized, and then this information
// is not available.
- Target_Ptr target;
- // FIXME this has to go away as soon as the target
- // does not throw when not initialized.
- try {
- target = zypp::getZYpp()->target();
- }
- catch ( const Exception &e )
- {
- // nothing to do
- }
+ Target_Ptr target = zypp::getZYpp()->getTarget();

static const std::string _value(
str::trim( str::form(
@@ -135,16 +117,7 @@
// agent string.
// The target could be not initialized, and then this information
// is not available.
- Target_Ptr target;
- // FIXME this has to go away as soon as the target
- // does not throw when not initialized.
- try {
- target = zypp::getZYpp()->target();
- }
- catch ( const Exception &e )
- {
- // nothing to do
- }
+ Target_Ptr target = zypp::getZYpp()->getTarget();

static const std::string _value(
str::form(

Modified: trunk/libzypp/zypp/media/MediaCurl.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/media/MediaCurl.cc?rev=11622&r1=11621&r2=11622&view=diff
==============================================================================
--- trunk/libzypp/zypp/media/MediaCurl.cc (original)
+++ trunk/libzypp/zypp/media/MediaCurl.cc Fri Nov 7 13:46:24 2008
@@ -191,16 +191,7 @@
// agent string.
// The target could be not initialized, and then this information
// is not available.
- Target_Ptr target;
- // FIXME this has to go away as soon as the target
- // does not throw when not initialized.
- try {
- target = zypp::getZYpp()->target();
- }
- catch ( const Exception &e )
- {
- // nothing to do
- }
+ Target_Ptr target = zypp::getZYpp()->getTarget();

static const std::string _value(
str::trim( str::form(
@@ -216,16 +207,7 @@
// agent string.
// The target could be not initialized, and then this information
// is not available.
- Target_Ptr target;
- // FIXME this has to go away as soon as the target
- // does not throw when not initialized.
- try {
- target = zypp::getZYpp()->target();
- }
- catch ( const Exception &e )
- {
- // nothing to do
- }
+ Target_Ptr target = zypp::getZYpp()->getTarget();

static const std::string _value(
str::trim( str::form(
@@ -242,17 +224,8 @@
// agent string.
// The target could be not initialized, and then this information
// is not available.
- Target_Ptr target;
- // FIXME this has to go away as soon as the target
- // does not throw when not initialized.
- try {
- target = zypp::getZYpp()->target();
- }
- catch ( const Exception &e )
- {
- // nothing to do
- }
-
+ Target_Ptr target = zypp::getZYpp()->getTarget();
+
static const std::string _value(
str::form(
"ZYpp %s (curl %s) %s"

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages