Before, unknown commands or invalid commandlines could cause an error to
be sent to the confmodule, but not printed with DEBCONF_DEBUG=developer,
making debugging such an error hard.
---
 Debconf/ConfModule.pm |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Debconf/ConfModule.pm b/Debconf/ConfModule.pm
index b3989a6..61f8b98 100644
--- a/Debconf/ConfModule.pm
+++ b/Debconf/ConfModule.pm
@@ -236,8 +236,10 @@ sub process_command {
                ($command, @params)=split(' ', $_);
        }
        if (! defined $command) {
-               return $codes{syntaxerror}.' '.
+               my $ret = $codes{syntaxerror}.' '.
                        "Bad line \"$_\" received from confmodule.";
+               debug developer => "--> $ret";
+               return $ret;
        }
        $command=lc($command);
        # This command could not be handled by a sub.
@@ -246,8 +248,10 @@ sub process_command {
        }
        # Make sure that the command is valid.
        if (! $this->can("command_$command")) {
-               return $codes{syntaxerror}.' '.
+               my $ret = $codes{syntaxerror}.' '.
                       "Unsupported command \"$command\" (full line was \"$_\") 
received from confmodule.";
+               debug developer => "--> $ret";
+               return $ret;
        }
        # Now call the subroutine for the command.
        $command="command_$command";
-- 
1.7.7.3




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to