Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
4d74c770
Commit
4d74c770
authored
Jun 13, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #469 from nafeger/devel
Add support for older version of python-apt
parents
2d6caa46
9b7e7092
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
library/apt
+10
-2
No files found.
library/apt
View file @
4d74c770
...
...
@@ -74,9 +74,17 @@ def package_status(pkgname, version, cache):
except
KeyError
:
fail_json
(
msg
=
"No package matching '%s' is available"
%
pkgname
)
if
version
:
return
pkg
.
is_installed
and
pkg
.
installed
.
version
==
version
,
False
try
:
return
pkg
.
is_installed
and
pkg
.
installed
.
version
==
version
,
False
except
AttributeError
:
#
assume
older
version
of
python
-
apt
is
installed
return
pkg
.
isInstalled
and
pkg
.
installedVersion
==
version
,
False
else
:
return
pkg
.
is_installed
,
pkg
.
is_upgradable
try
:
return
pkg
.
is_installed
,
pkg
.
is_upgradable
except
AttributeError
:
#
assume
older
version
of
python
-
apt
is
installed
return
pkg
.
isInstalled
,
pkg
.
isUpgradable
def
install
(
pkgspec
,
cache
,
upgrade
=
False
,
default_release
=
None
):
name
,
version
=
package_split
(
pkgspec
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment