diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2017-01-29 15:01:00 -0800 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-08-17 12:47:29 -1000 |
commit | 54cc69889ed056d93e416fa76c4d6a6b0ed30ebc (patch) | |
tree | a3df6779af006394dcf147a59586f588ee43b1b9 /apt-pkg/contrib/error.cc | |
parent | aa376cf54fbf98b7f13f86c2d46e19d6c941876b (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) |