Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Compatibility with older versions of python3-apt. #287

Merged
merged 1 commit into from
Mar 23, 2020

Conversation

a-martynovich
Copy link
Contributor

@a-martynovich a-martynovich commented Mar 23, 2020

Fixes an error on Ubuntu Xenial and Debian Stretch.
#257

@cla-bot cla-bot bot added the cla-signed label Mar 23, 2020
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@a-martynovich a-martynovich requested a review from rptrchv March 23, 2020 08:48
@vpetersson vpetersson merged commit 6c71abb into WoTTsecurity:master Mar 23, 2020
pkg = cache.get(pkg_name)
# Older versions of python3-apt don't provide full dict interface, namely .get().
# The result of this expression will either be False or a apt.package.Package instance.
pkg = pkg_name in cache and cache[pkg_name]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using readable if clause, you used a very tricky unreadable construction and had to add a special comment explaining it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants