Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
9f94632c
Commit
9f94632c
authored
Sep 11, 2018
by
Renán Sosa Guillen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L2A propudct population
parent
abb0da9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
populate_products_l2a.py
catalog/management/commands/populate_products_l2a.py
+2
-1
No files found.
catalog/management/commands/populate_products_l2a.py
View file @
9f94632c
...
@@ -34,6 +34,7 @@ class Command(BaseCommand):
...
@@ -34,6 +34,7 @@ class Command(BaseCommand):
sftp
=
ssh
.
open_sftp
()
## Creates SFTPClient() object
sftp
=
ssh
.
open_sftp
()
## Creates SFTPClient() object
sftp
.
chdir
(
path
)
sftp
.
chdir
(
path
)
file_list
=
sftp
.
listdir
()
file_list
=
sftp
.
listdir
()
file_list
.
sort
()
for
file
in
file_list
:
for
file
in
file_list
:
file_name
=
file
.
replace
(
".zip"
,
''
)
file_name
=
file
.
replace
(
".zip"
,
''
)
...
@@ -57,7 +58,7 @@ class Command(BaseCommand):
...
@@ -57,7 +58,7 @@ class Command(BaseCommand):
# print "Product " + file_name + " is ALREADY in DB."
# print "Product " + file_name + " is ALREADY in DB."
except
:
except
:
print
"Error con archivo "
+
file
_name
print
"Error con archivo "
+
file
except
Exception
as
e
:
except
Exception
as
e
:
sys
.
stderr
.
write
(
"SSH connection error: {0}"
.
format
(
e
))
sys
.
stderr
.
write
(
"SSH connection error: {0}"
.
format
(
e
))
...
...
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