summaryrefslogtreecommitdiffstats
path: root/urpm/cdrom.pm
diff options
context:
space:
mode:
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;