From a02ce73d60672047ab83438e35ba25f224c9bfbb Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 29 Jan 2012 03:34:52 +0000 Subject: (_try_mounting_cdrom_using_hal) make it more readable --- urpm/cdrom.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'urpm') 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; -- cgit v1.2.1