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
c4852f69
Commit
c4852f69
authored
Aug 13, 2013
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up some pep8 whitespace issues in mongodb_user
parent
eaac295f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
library/database/mongodb_user
+9
-9
No files found.
library/database/mongodb_user
View file @
c4852f69
...
...
@@ -115,16 +115,16 @@ else:
def
user_add
(
module
,
client
,
db_name
,
user
,
password
,
roles
):
try
:
db
=
client
[
db_name
]
if
roles
is
None
:
db
.
add_user
(
user
,
password
,
False
)
else
:
try
:
db
.
add_user
(
user
,
password
,
None
,
roles
=
roles
)
except
:
module
.
fail_json
(
msg
=
'"problem adding user; you must be on mongodb 2.4+ and pymongo 2.5+ to use the roles param"'
)
db
=
client
[
db_name
]
if
roles
is
None
:
db
.
add_user
(
user
,
password
,
False
)
else
:
try
:
db
.
add_user
(
user
,
password
,
None
,
roles
=
roles
)
except
:
module
.
fail_json
(
msg
=
'"problem adding user; you must be on mongodb 2.4+ and pymongo 2.5+ to use the roles param"'
)
except
OperationFailure
:
return
False
return
False
return
True
...
...
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