[HAVE REVIEW] Lots of empty lists remain in config file

VERIFIED FIXED in 2.4

Status

Webtools
Mozbot
P1
critical
VERIFIED FIXED
16 years ago
9 years ago

People

(Reporter: Hixie (not reading bugmail), Assigned: Hixie (not reading bugmail))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

16 years ago
from my config file:

MagicEightBall::allowusers
MagicEightBall::channelsBlocked
MagicEightBall::denyusers
MagicEightBall::allowusers
MagicEightBall::channelsBlocked
MagicEightBall::denyusers
MagicEightBall::allowusers
MagicEightBall::channelsBlocked
MagicEightBall::denyusers
(Assignee)

Updated

16 years ago
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → Mozbot 2.4
(Assignee)

Comment 1

16 years ago
Index: lib/Configuration.pm===================================================================RCS file: /cvsroot/mozilla/webtools/mozbot/lib/Configuration.pm,vretrieving revision 2.1diff -u -r2.1 Configuration.pm--- lib/Configuration.pm	26 Feb 2002 22:48:35 -0000	2.1+++ lib/Configuration.pm	25 Mar 2002 00:50:57 -0000@@ -89,7 +89,7 @@     my %seen;     foreach (@lines) {         chomp;-        if (/^ *([^#;][^=\n\r]*)=(.*)$/os) {+        if (/^ *([^#;][^=\n\r]*)(?:=(.*))?$/os) {             if (defined($$config{$1})) {                 unless ($seen{$1}) {                     my $value = $$config{$1};@@ -135,7 +135,11 @@                     $seen{$1} = 1;                 } # else seen it already             } else { # unknown-                print FILE "$1=$2\n";+                if (defined($2)) {+                    print FILE "$1=$2\n";+                } else {+                    print FILE "$1\n";+                }             }         } else {             # might be a comment
Keywords: review
Summary: Lots of empty lists remain in config file → [HAVE FIX] Lots of empty lists remain in config file
(Assignee)

Comment 2

16 years ago
yay konqueror. Mark II:

Index: lib/Configuration.pm
===================================================================
RCS file: /cvsroot/mozilla/webtools/mozbot/lib/Configuration.pm,v
retrieving revision 2.1
diff -u -r2.1 Configuration.pm
--- lib/Configuration.pm	26 Feb 2002 22:48:35 -0000	2.1
+++ lib/Configuration.pm	25 Mar 2002 01:34:19 -0000
@@ -89,7 +89,7 @@
     my %seen;
     foreach (@lines) {
         chomp;
-        if (/^ *([^#;][^=\n\r]*)=(.*)$/os) {
+        if (/^ *([^#;][^=\n\r]*)(?:=(.*))?$/os) {
             if (defined($$config{$1})) {
                 unless ($seen{$1}) {
                     my $value = $$config{$1};
@@ -135,7 +135,11 @@
                     $seen{$1} = 1;
                 } # else seen it already
             } else { # unknown
-                print FILE "$1=$2\n";
+                if (defined($2)) {
+                    print FILE "$1=$2\n";
+                } else {
+                    print FILE "$1\n";
+                }
             }
         } else {
             # might be a comment

Updated

16 years ago
QA Contact: timeless → kerz
(Assignee)

Comment 3

16 years ago
<timeless> 133179 is fine.
r=timeless
Keywords: review
Summary: [HAVE FIX] Lots of empty lists remain in config file → [HAVE REVIEW] Lots of empty lists remain in config file
(Assignee)

Comment 4

16 years ago
Checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
QA Contact: kerz → mozbot
Verified Fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.