diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-11-14 15:01:34 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-11-14 15:01:34 +0000 |
commit | f505ec829abf9a7e415e0719cedc26f116f42ff8 (patch) | |
tree | 9751f695150953e357beaaca0894437c85a2109d /urpm.pm | |
parent | dfb0b59296ce2b2822dc678b7ff6145b93a57dc8 (diff) | |
download | urpmi-f505ec829abf9a7e415e0719cedc26f116f42ff8.tar urpmi-f505ec829abf9a7e415e0719cedc26f116f42ff8.tar.gz urpmi-f505ec829abf9a7e415e0719cedc26f116f42ff8.tar.bz2 urpmi-f505ec829abf9a7e415e0719cedc26f116f42ff8.tar.xz urpmi-f505ec829abf9a7e415e0719cedc26f116f42ff8.zip |
don't allow calling ->add_media or ->add_distrib_media with unitialised $urpm->{media}
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -726,7 +726,7 @@ sub add_medium { my ($urpm, $name, $url, $with_hdlist, %options) = @_; #- make sure configuration has been read. - $urpm->{media} or $urpm->read_config; + $urpm->{media} or die "caller should have used ->read_config or ->configure first"; $urpm->lock_urpmi_db('exclusive') if !$options{nolock}; #- if a medium with that name has already been found, we have to exit now @@ -809,7 +809,7 @@ sub add_distrib_media { my ($urpm, $name, $url, %options) = @_; #- make sure configuration has been read. - $urpm->{media} or $urpm->read_config; + $urpm->{media} or die "caller should have used ->read_config or ->configure first"; my $distribconf; |