diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2017-01-29 15:01:00 -0800 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2020-07-17 00:22:23 -1000 |
commit | bf52d8261295b37473df85c4d15130350ddb6f2a (patch) | |
tree | d89125003addce619c37586c9b9b364bc56f9a9d /apt-pkg/contrib/error.cc | |
parent | d1fc58d91e2ef47c58adb19ac2c0c541f4bae45c (diff) |
The entire concept of PendingError() is flawed :/.
Diffstat (limited to 'apt-pkg/contrib/error.cc')
-rw-r--r-- | apt-pkg/contrib/error.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apt-pkg/contrib/error.cc b/apt-pkg/contrib/error.cc index 3c397eaf8..143b99557 100644 --- a/apt-pkg/contrib/error.cc +++ b/apt-pkg/contrib/error.cc @@ -206,6 +206,15 @@ void GlobalError::Discard() { PendingFlag = false; } /*}}}*/ +// GlobalError::ReturnError - convert a stored error to a return code /*{{{*/ +bool GlobalError::ReturnError() { + for (auto &message : Messages) + if (message.Type == ERROR) + message.Type = WARNING; + PendingFlag = false; + return false; +} + /*}}}*/ // GlobalError::empty - does our error list include anything? /*{{{*/ bool GlobalError::empty(MsgType const &threshold) const { if (PendingFlag == true) |