summaryrefslogtreecommitdiffstats
path: root/urpm/cdrom.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-01-29 03:34:52 +0000
committerThierry Vignaud <tv@mageia.org>2012-01-29 03:34:52 +0000
commita02ce73d60672047ab83438e35ba25f224c9bfbb (patch)
tree50198a406087d380c9ca7fcc16d7c6be504ba54e /urpm/cdrom.pm
parent605c9330574be6e2909d35ff9017d3befa879323 (diff)
downloadurpmi-a02ce73d60672047ab83438e35ba25f224c9bfbb.tar
urpmi-a02ce73d60672047ab83438e35ba25f224c9bfbb.tar.gz
urpmi-a02ce73d60672047ab83438e35ba25f224c9bfbb.tar.bz2
urpmi-a02ce73d60672047ab83438e35ba25f224c9bfbb.tar.xz
urpmi-a02ce73d60672047ab83438e35ba25f224c9bfbb.zip
(_try_mounting_cdrom_using_hal) make it more readable
Diffstat (limited to 'urpm/cdrom.pm')
-rw-r--r--urpm/cdrom.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/urpm/cdrom.pm b/urpm/cdrom.pm
index 734525bb..6a6d0b80 100644
--- a/urpm/cdrom.pm
+++ b/urpm/cdrom.pm
@@ -69,9 +69,8 @@ sub _try_mounting_cdrom_using_hal {
my $hal_cdroms = eval { Hal::Cdroms->new } or $urpm->{fatal}(10, N("Udisks daemon (udisks-daemon) is not running or not ready"));
foreach my $hal_path ($hal_cdroms->list) {
- my $mntpoint;
- if ($mntpoint = $hal_cdroms->get_mount_point($hal_path)) {
- } else {
+ my $mntpoint = $hal_cdroms->get_mount_point($hal_path;
+ if (!$mntpoint) {
$urpm->{log}("trying to mount $hal_path");
$mntpoint = $hal_cdroms->ensure_mounted($hal_path)
or $urpm->{error}("failed to mount $hal_path: $hal_cdroms->{error}"), next;