Commit abb0da9f authored by Renán Sosa Guillen's avatar Renán Sosa Guillen

L1C propudct population

parent 32b3280f
...@@ -63,6 +63,7 @@ class Command(BaseCommand): ...@@ -63,6 +63,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", '')
...@@ -84,7 +85,7 @@ class Command(BaseCommand): ...@@ -84,7 +85,7 @@ class Command(BaseCommand):
print "NEW product with UUID: " + data_dict['id'] print "NEW product with UUID: " + data_dict['id']
except: except:
print "ERROR with file " + file_name print "ERROR with file " + file
# else: # else:
# print "Product " + file_name + " is ALREADY in DB." # print "Product " + file_name + " is ALREADY in DB."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment