Author: mlandres Date: Wed Sep 24 13:37:11 2008 New Revision: 11141 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11141&view=rev Log: use non-throwing test for presence of Target Modified: trunk/libzypp/zypp/RepoManager.cc Modified: trunk/libzypp/zypp/RepoManager.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.cc?rev=11141&r1=11140&r2=11141&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.cc (original) +++ trunk/libzypp/zypp/RepoManager.cc Wed Sep 24 13:37:11 2008 @@ -109,11 +109,12 @@ knownReposPath = Pathname::assertprefix( root_r, ZConfig::instance().knownReposPath() ); knownServicesPath = Pathname::assertprefix( root_r, ZConfig::instance().knownServicesPath() ); probe = ZConfig::instance().repo_add_probe(); - try + + if ( getZYpp()->getTarget() ) { servicesTargetDistro = getZYpp()->target()->targetDistribution(); } - catch (const Exception & e) + else { DBG << "Target not initialized, using an empty servicesTargetDistro." << endl; } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org