summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2004-02-10 13:52:27 +0000
committerFlorent Villard <warly@mandriva.com>2004-02-10 13:52:27 +0000
commit11db875d0701d3072ddbd969be3dba3b04c027da (patch)
tree9c1475fd7a49b6061b8ea5cbc943a7589e440ec2
parent2695539a49e333a27013e1b20e4f2b982960eebb (diff)
downloaddrakwizard-11db875d0701d3072ddbd969be3dba3b04c027da.tar
drakwizard-11db875d0701d3072ddbd969be3dba3b04c027da.tar.gz
drakwizard-11db875d0701d3072ddbd969be3dba3b04c027da.tar.bz2
drakwizard-11db875d0701d3072ddbd969be3dba3b04c027da.tar.xz
drakwizard-11db875d0701d3072ddbd969be3dba3b04c027da.zip
fix list_printers function
-rwxr-xr-xsamba_wizard/Samba.pm9
1 files changed, 1 insertions, 8 deletions
diff --git a/samba_wizard/Samba.pm b/samba_wizard/Samba.pm
index 91d138d4..0c8ee6e3 100755
--- a/samba_wizard/Samba.pm
+++ b/samba_wizard/Samba.pm
@@ -334,14 +334,7 @@ sub list_printers {
my @list if 0;
return @list if @list;
- @list = sort grep { /^(?!#).+/ } map {
- split(':', $_)->[0];
- } cat_("/etc/printcap");
- if (@list) {
- @list
- } else {
- ()
- }
+ sort grep { ! /^#/ } map { /([^:]*):/ and $1 } cat_("/etc/printcap");
}