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
58620ca4
Commit
58620ca4
authored
Sep 19, 2013
by
David Stygstra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Python 2.4 support to modprobe module
parent
27a08dc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
library/system/modprobe
+8
-3
No files found.
library/system/modprobe
View file @
58620ca4
...
@@ -57,9 +57,14 @@ def main():
...
@@ -57,9 +57,14 @@ def main():
# Check if module is present
# Check if module is present
try
:
try
:
with
open
(
'/proc/modules'
)
as
modules
:
modules
=
open
(
'/proc/modules'
)
present
=
any
(
module
.
startswith
(
args
[
'name'
]
+
' '
)
for
module
in
modules
)
present
=
False
except
IOError
as
e
:
for
line
in
modules
:
if
line
.
startswith
(
args
[
'name'
]
+
' '
):
present
=
True
break
modules
.
close
()
except
IOError
,
e
:
module
.
fail_json
(
msg
=
str
(
e
),
**
args
)
module
.
fail_json
(
msg
=
str
(
e
),
**
args
)
# Check only; don't modify
# Check only; don't modify
...
...
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