summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/standalone/drakids27
-rw-r--r--perl-install/standalone/net_applet5
2 files changed, 11 insertions, 21 deletions
diff --git a/perl-install/standalone/drakids b/perl-install/standalone/drakids
index 71c7a1339..8bfcf6704 100644
--- a/perl-install/standalone/drakids
+++ b/perl-install/standalone/drakids
@@ -141,12 +141,11 @@ sub get_selected_blacklist() {
sub unblacklist {
my @addr = @_;
eval { $activefw->unblacklist($_) foreach @addr };
- if ($@) {
- my $error = $@;
- err_dialog(N("Error"), N("Unable to remove from blacklist: %s", $error));
- return;
+ if (!$@) {
+ list_remove_addr($blacklist->{data}, @addr);
+ } else {
+ err_dialog(N("Active Firewall"), N("Unable to contact daemon"));
}
- list_remove_addr($blacklist->{data}, @addr);
}
#- may throw an exception
@@ -171,20 +170,17 @@ sub whitelist {
my @addr = @_;
unblacklist(@addr);
eval { $activefw->whitelist($_) foreach @addr };
- if ($@) {
- my $error = $@;
- err_dialog(N("Error"), N("Unable to move in whitelist: %s", $error));
- }
+ $@ and err_dialog(N("Active Firewall"), N("Unable to contact daemon"));
}
sub unwhitelist {
my @addr = @_;
eval { $activefw->unwhitelist($_) foreach @addr };
- if ($@) {
- my $error = $@;
- err_dialog(N("Error"), N("Unable to remove from whitelist: %s", $error));
+ if (!$@) {
+ list_remove_addr($whitelist->{data}, @addr);
+ } else {
+ err_dialog(N("Active Firewall"), N("Unable to contact daemon"));
}
- list_remove_addr($whitelist->{data}, @addr);
}
sub init_lists() {
@@ -192,10 +188,7 @@ sub init_lists() {
init_blacklist();
init_whitelist();
};
- if ($@) {
- my $error = $@;
- err_dialog(N("Error"), N("Unable to contact the Active Firewall daemon: %s", $error));
- }
+ $@ and err_dialog(N("Active Firewall"), N("Unable to contact daemon"));
}
sub clear_lists() {
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet
index 6a03b85a5..4f90ca3bc 100644
--- a/perl-install/standalone/net_applet
+++ b/perl-install/standalone/net_applet
@@ -159,10 +159,7 @@ sub generate_wireless_menuitem {
$net->{activate} = $net->{menuitem}->signal_connect('activate' => sub {
if (exists $net->{id}) {
eval { $monitor->select_network($net->{id}) };
- if ($@) {
- my $error = $@;
- err_dialog(N("Error"), N("Unable to select wireless network: %s", $error));
- }
+ $@ and err_dialog(N("Active Firewall"), N("Unable to contact daemon"));
} else {
run_drakroam();
}