Fixes issue 199 by ignoring items/lines that are completely invalid when parsing a signature file #203
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue 199.
Since the generation of the signature file is done by directly writing the output of the apt backend command, it was easier to fix this when parsing the signature file by putting the line splitting in a
try
block and simple ignoring that line/item if that fails.In my opinion this isn't even an issue that we should have to fix in
apt-offline
. It should be the case thatapt
andapt-get
do not output this advertisement when you enable the highest quiet level likeapt-offline
does. If this is fixed in those tools later, thisapt-offline
fix will just have no effect but will not cause any problems. This fix should also protect against any future odd lines that they decide to haveapt
orapt-get
print out even in quiet mode.