Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
61ea2d7b
Commit
61ea2d7b
authored
12 years ago
by
Ashley Penney
Browse files
Options
Downloads
Patches
Plain Diff
Couple of fixes to the settings data.
parent
1acf2dbb
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/djangoapps/student/management/commands/pearson.py
+6
-6
6 additions, 6 deletions
common/djangoapps/student/management/commands/pearson.py
with
6 additions
and
6 deletions
common/djangoapps/student/management/commands/pearson.py
+
6
−
6
View file @
61ea2d7b
...
...
@@ -25,11 +25,11 @@ class Command(BaseCommand):
for
mode
in
args
:
if
mode
==
'
export
'
:
sftp
(
settings
.
PEARSON
[
LOCAL_IMPORT
],
settings
.
PEARSON
[
SFTP_IMPORT
])
s3
(
settings
.
PEARSON_LOCAL
,
settings
.
PEARSON
[
BUCKET
])
elif
mode
==
'
import
'
:
sftp
(
settings
.
PEARSON
[
SFTP_EXPORT
],
settings
.
PEARSON
[
LOCAL_EXPORT
])
sftp
(
settings
.
PEARSON
[
LOCAL_EXPORT
],
settings
.
PEARSON
[
SFTP_EXPORT
])
s3
(
settings
.
PEARSON
[
LOCAL_EXPORT
],
settings
.
PEARSON
[
BUCKET
])
elif
mode
==
'
import
'
:
sftp
(
settings
.
PEARSON
[
SFTP_IMPORT
],
settings
.
PEARSON
[
LOCAL_IMPORT
])
s3
(
settings
.
PEARSON
[
LOCAL_IMPORT
],
settings
.
PEARSON
[
BUCKET
])
else
:
print
(
"
ERROR: Mode must be export or import.
"
)
...
...
@@ -37,8 +37,8 @@ class Command(BaseCommand):
with
dog_stats_api
.
timer
(
'
pearson.{0}
'
.
format
(
mode
),
tags
=
'
sftp
'
):
try
:
t
=
paramiko
.
Transport
((
hostname
,
22
))
t
.
connect
(
username
=
settings
.
PEARSON
_
SFTP_USERNAME
,
password
=
settings
.
PEARSON
_
SFTP_PASSWORD
)
t
.
connect
(
username
=
settings
.
PEARSON
[
SFTP_USERNAME
]
,
password
=
settings
.
PEARSON
[
SFTP_PASSWORD
]
)
sftp
=
paramiko
.
SFTPClient
.
from_transport
(
t
)
if
os
.
path
.
isdir
(
files_from
):
for
file
in
os
.
listdir
(
files_from
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment