Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx
edx-platform
Commits
49f78b47
Commit
49f78b47
authored
Jul 11, 2015
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `logging-not-lazy` Pylint violations
parent
39d35374
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
23 deletions
+23
-23
common/lib/capa/capa/capa_problem.py
+1
-1
common/lib/symmath/symmath/symmath_check.py
+1
-1
common/lib/xmodule/xmodule/course_module.py
+1
-1
lms/djangoapps/django_comment_client/permissions.py
+1
-1
lms/djangoapps/django_comment_client/tests/mock_cs_server/mock_cs_server.py
+2
-2
lms/djangoapps/django_comment_client/utils.py
+1
-1
lms/djangoapps/lms_migration/migrate.py
+12
-12
lms/djangoapps/psychometrics/psychoanalyze.py
+4
-4
No files found.
common/lib/capa/capa/capa_problem.py
View file @
49f78b47
...
...
@@ -631,7 +631,7 @@ class LoncapaProblem(object):
parent
=
inc
.
getparent
()
parent
.
insert
(
parent
.
index
(
inc
),
incxml
)
parent
.
remove
(
inc
)
log
.
debug
(
'Included
%
s into
%
s'
%
(
filename
,
self
.
problem_id
)
)
log
.
debug
(
'Included
%
s into
%
s'
,
filename
,
self
.
problem_id
)
def
_extract_system_path
(
self
,
script
):
"""
...
...
common/lib/symmath/symmath/symmath_check.py
View file @
49f78b47
...
...
@@ -255,7 +255,7 @@ def symmath_check(expect, ans, dynamath=None, options=None, debug=None, xml=None
fsym
=
f
.
sympy
msg
+=
'<p>You entered:
%
s</p>'
%
to_latex
(
f
.
sympy
)
except
Exception
,
err
:
log
.
exception
(
"Error evaluating expression '
%
s' as a valid equation"
%
ans
)
log
.
exception
(
"Error evaluating expression '
%
s' as a valid equation"
,
ans
)
msg
+=
"<p>Error in evaluating your expression '
%
s' as a valid equation</p>"
%
(
ans
)
if
"Illegal math"
in
str
(
err
):
msg
+=
"<p>Illegal math expression</p>"
...
...
common/lib/xmodule/xmodule/course_module.py
View file @
49f78b47
...
...
@@ -118,7 +118,7 @@ class Textbook(object):
pass
# Get the table of contents from S3
log
.
info
(
"Retrieving textbook table of contents from
%
s"
%
toc_url
)
log
.
info
(
"Retrieving textbook table of contents from
%
s"
,
toc_url
)
try
:
r
=
requests
.
get
(
toc_url
)
except
Exception
as
err
:
...
...
lms/djangoapps/django_comment_client/permissions.py
View file @
49f78b47
...
...
@@ -120,5 +120,5 @@ def check_permissions_by_view(user, course_id, content, name):
try
:
p
=
VIEW_PERMISSIONS
[
name
]
except
KeyError
:
logging
.
warning
(
"Permission for view named
%
s does not exist in permissions.py"
%
name
)
logging
.
warning
(
"Permission for view named
%
s does not exist in permissions.py"
,
name
)
return
_check_conditions_permissions
(
user
,
p
,
course_id
,
content
)
lms/djangoapps/django_comment_client/tests/mock_cs_server/mock_cs_server.py
View file @
49f78b47
...
...
@@ -33,7 +33,7 @@ class MockCommentServiceRequestHandler(BaseHTTPRequestHandler):
if
'X-Edx-Api-Key'
in
self
.
headers
:
response
=
self
.
server
.
_response_str
# Log the response
logger
.
debug
(
"Comment Service: sending response
%
s"
%
json
.
dumps
(
response
))
logger
.
debug
(
"Comment Service: sending response
%
s"
,
json
.
dumps
(
response
))
# Send a response back to the client
self
.
send_response
(
200
)
...
...
@@ -71,7 +71,7 @@ class MockCommentServiceRequestHandler(BaseHTTPRequestHandler):
if
'X-Edx-Api-Key'
in
self
.
headers
:
response
=
self
.
server
.
_response_str
# Log the response
logger
.
debug
(
"Comment Service: sending response
%
s"
%
json
.
dumps
(
response
))
logger
.
debug
(
"Comment Service: sending response
%
s"
,
json
.
dumps
(
response
))
# Send a response back to the client
self
.
send_response
(
200
)
...
...
lms/djangoapps/django_comment_client/utils.py
View file @
49f78b47
...
...
@@ -389,7 +389,7 @@ class QueryCountDebugMiddleware(object):
query_time
=
query
.
get
(
'duration'
,
0
)
/
1000
total_time
+=
float
(
query_time
)
log
.
info
(
'
%
s queries run, total
%
s seconds'
%
(
len
(
connection
.
queries
),
total_time
)
)
log
.
info
(
u'
%
s queries run, total
%
s seconds'
,
len
(
connection
.
queries
),
total_time
)
return
response
...
...
lms/djangoapps/lms_migration/migrate.py
View file @
49f78b47
...
...
@@ -77,7 +77,7 @@ def manage_modulestores(request, reload_dir=None, commit_id=None):
else
:
html
+=
'Permission denied'
html
+=
"</body></html>"
log
.
debug
(
'request denied, ALLOWED_IPS=
%
s'
%
ALLOWED_IPS
)
log
.
debug
(
'request denied, ALLOWED_IPS=
%
s'
,
ALLOWED_IPS
)
return
HttpResponse
(
html
,
status
=
403
)
#----------------------------------------
...
...
@@ -90,8 +90,8 @@ def manage_modulestores(request, reload_dir=None, commit_id=None):
# reloading based on commit_id is needed when running mutiple worker threads,
# so that a given thread doesn't reload the same commit multiple times
current_commit_id
=
get_commit_id
(
def_ms
.
courses
[
reload_dir
])
log
.
debug
(
'commit_id="
%
s"'
%
commit_id
)
log
.
debug
(
'current_commit_id="
%
s"'
%
current_commit_id
)
log
.
debug
(
'commit_id="
%
s"'
,
commit_id
)
log
.
debug
(
'current_commit_id="
%
s"'
,
current_commit_id
)
if
(
commit_id
is
not
None
)
and
(
commit_id
==
current_commit_id
):
html
+=
"<h2>Already at commit id
%
s for
%
s</h2>"
%
(
commit_id
,
reload_dir
)
...
...
@@ -158,9 +158,9 @@ def manage_modulestores(request, reload_dir=None, commit_id=None):
#----------------------------------------
log
.
debug
(
'_MODULESTORES=
%
s'
%
ms
)
log
.
debug
(
'courses=
%
s'
%
courses
)
log
.
debug
(
'def_ms=
%
s'
%
unicode
(
def_ms
))
log
.
debug
(
'_MODULESTORES=
%
s'
,
ms
)
log
.
debug
(
'courses=
%
s'
,
courses
)
log
.
debug
(
'def_ms=
%
s'
,
unicode
(
def_ms
))
html
+=
"</body></html>"
return
HttpResponse
(
html
)
...
...
@@ -189,7 +189,7 @@ def gitreload(request, reload_dir=None):
else
:
html
+=
'Permission denied'
html
+=
"</body></html>"
log
.
debug
(
'request denied from
%
s, ALLOWED_IPS=
%
s'
%
(
ip
,
ALLOWED_IPS
)
)
log
.
debug
(
'request denied from
%
s, ALLOWED_IPS=
%
s'
,
ip
,
ALLOWED_IPS
)
return
HttpResponse
(
html
)
#----------------------------------------
...
...
@@ -197,14 +197,14 @@ def gitreload(request, reload_dir=None):
if
reload_dir
is
None
and
'payload'
in
request
.
POST
:
payload
=
request
.
POST
[
'payload'
]
log
.
debug
(
"payload=
%
s"
%
payload
)
log
.
debug
(
"payload=
%
s"
,
payload
)
gitargs
=
json
.
loads
(
payload
)
log
.
debug
(
"gitargs=
%
s"
%
gitargs
)
log
.
debug
(
"gitargs=
%
s"
,
gitargs
)
reload_dir
=
gitargs
[
'repository'
][
'name'
]
log
.
debug
(
"github reload_dir=
%
s"
%
reload_dir
)
log
.
debug
(
"github reload_dir=
%
s"
,
reload_dir
)
gdir
=
settings
.
DATA_DIR
/
reload_dir
if
not
os
.
path
.
exists
(
gdir
):
log
.
debug
(
"====> ERROR in gitreload - no such directory
%
s"
%
reload_dir
)
log
.
debug
(
"====> ERROR in gitreload - no such directory
%
s"
,
reload_dir
)
return
HttpResponse
(
'Error'
)
cmd
=
"cd
%
s; git reset --hard HEAD; git clean -f -d; git pull origin; chmod g+w course.xml"
%
gdir
log
.
debug
(
os
.
popen
(
cmd
)
.
read
())
...
...
@@ -213,7 +213,7 @@ def gitreload(request, reload_dir=None):
if
gh
:
ghurl
=
'
%
s/
%
s'
%
(
gh
,
reload_dir
)
r
=
requests
.
get
(
ghurl
)
log
.
debug
(
"GITRELOAD_HOOK to
%
s:
%
s"
%
(
ghurl
,
r
.
text
)
)
log
.
debug
(
"GITRELOAD_HOOK to
%
s:
%
s"
,
ghurl
,
r
.
text
)
#----------------------------------------
# reload course if specified
...
...
lms/djangoapps/psychometrics/psychoanalyze.py
View file @
49f78b47
...
...
@@ -266,7 +266,7 @@ def generate_plots_for_problem(problem):
yset
[
'fitx'
]
=
fitx
yset
[
'fity'
]
=
func_2pl
(
np
.
array
(
fitx
),
*
cfp
[
0
])
except
Exception
as
err
:
log
.
debug
(
'Error in psychoanalyze curve fitting:
%
s'
%
err
)
log
.
debug
(
'Error in psychoanalyze curve fitting:
%
s'
,
err
)
dataset
[
'grade_
%
d'
%
grade
]
=
yset
...
...
@@ -339,14 +339,14 @@ def make_psychometrics_data_update_handler(course_id, user, module_state_key):
state
=
json
.
loads
(
sm
.
state
)
done
=
state
[
'done'
]
except
:
log
.
exception
(
"Oops, failed to eval state for
%
s (state=
%
s)"
%
(
sm
,
sm
.
state
)
)
log
.
exception
(
"Oops, failed to eval state for
%
s (state=
%
s)"
,
sm
,
sm
.
state
)
return
pmd
.
done
=
done
try
:
pmd
.
attempts
=
state
.
get
(
'attempts'
,
0
)
except
:
log
.
exception
(
"no attempts for
%
s (state=
%
s)"
%
(
sm
,
sm
.
state
)
)
log
.
exception
(
"no attempts for
%
s (state=
%
s)"
,
sm
,
sm
.
state
)
try
:
checktimes
=
eval
(
pmd
.
checktimes
)
# update log of attempt timestamps
...
...
@@ -357,6 +357,6 @@ def make_psychometrics_data_update_handler(course_id, user, module_state_key):
try
:
pmd
.
save
()
except
:
log
.
exception
(
"Error in updating psychometrics data for
%
s"
%
sm
)
log
.
exception
(
"Error in updating psychometrics data for
%
s"
,
sm
)
return
psychometrics_data_update_handler
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