summaryrefslogtreecommitdiff
path: root/cmdline/apt-cdrom.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-07-29 16:18:10 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-07-29 16:18:10 +0200
commit15240f4b681ca35c669d2b2e6e34f8ee3f6c06d9 (patch)
tree4139050e3c2f00650a0d316c971c4e7b8aba3e58 /cmdline/apt-cdrom.cc
parent34904390bd6901f3de90249938baa0b875873534 (diff)
parent1b8ba3ba050f01db27f1ddc0e5b280b2fccd9fb9 (diff)
merged with the debian-experimental-ma branch
Diffstat (limited to 'cmdline/apt-cdrom.cc')
-rw-r--r--cmdline/apt-cdrom.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc
index 8b9eacae6..d1268edf9 100644
--- a/cmdline/apt-cdrom.cc
+++ b/cmdline/apt-cdrom.cc
@@ -266,20 +266,18 @@ int main(int argc,const char *argv[]) /*{{{*/
return ShowHelp();
// Deal with stdout not being a tty
- if (isatty(STDOUT_FILENO) && _config->FindI("quiet",0) < 1)
+ if (isatty(STDOUT_FILENO) && _config->FindI("quiet", -1) == -1)
_config->Set("quiet","1");
// Match the operation
CmdL.DispatchArg(Cmds);
// Print any errors or warnings found during parsing
- if (_error->empty() == false)
- {
- bool Errors = _error->PendingError();
+ bool const Errors = _error->PendingError();
+ if (_config->FindI("quiet",0) > 0)
_error->DumpErrors();
- return Errors == true?100:0;
- }
-
- return 0;
+ else
+ _error->DumpErrors(GlobalError::DEBUG);
+ return Errors == true ? 100 : 0;
}
/*}}}*/