summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/error.cc
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2018-12-26 13:07:23 -1000
committerSam Bingner <sam@bingner.com>2018-12-26 14:51:59 -1000
commit59c3e0b998fd69532159d8dc416109cf50651482 (patch)
tree2e58bef1273e4d3542c168980e4a2d793e170045 /apt-pkg/contrib/error.cc
parentac0d26d4e39da16bdbf575637fd3d4b24a7fb4b8 (diff)
parent2aa218273eb6009880e987f90d3e24b8efb04642 (diff)
Merge nitotv apt fixes into 1.4.81.4.8+nitotv
Diffstat (limited to 'apt-pkg/contrib/error.cc')
-rw-r--r--apt-pkg/contrib/error.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/apt-pkg/contrib/error.cc b/apt-pkg/contrib/error.cc
index c06ea8364..7d397d2c6 100644
--- a/apt-pkg/contrib/error.cc
+++ b/apt-pkg/contrib/error.cc
@@ -227,6 +227,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)