pull/838/head
Piero Toffanin 2020-03-23 16:38:50 -04:00
rodzic 4c63208cd9
commit 217990288d
3 zmienionych plików z 4 dodań i 5 usunięć

Wyświetl plik

@ -58,9 +58,6 @@ class GCPFile:
:param image_ratios dictionary with "imagename" --> "resize_ratio" values
:return path to new GCP file
"""
if os.path.exists(gcp_file_output):
os.remove(gcp_file_output)
output = [self.raw_srs]
for entry in self.iter_entries():

Wyświetl plik

@ -897,7 +897,9 @@ class Task(models.Model):
try:
gcpFile = GCPFile(gcp_path)
return gcpFile.create_resized_copy(gcp_path, image_ratios)
gcpFile.create_resized_copy(gcp_path, image_ratios)
logger.info("Resized GCP file {}".format(gcp_path))
return gcp_path
except Exception as e:
logger.warning("Could not resize GCP file {}: {}".format(gcp_path, str(e)))

Wyświetl plik

@ -795,7 +795,7 @@ class TestApiTask(BootTransactionTestCase):
worker.tasks.process_pending_tasks()
task = Task.objects.get(pk=res.data['id'])
self.assertTrue(task.status == status_codes.COMPLETED)
self.assertEqual(task.status, status_codes.COMPLETED)
# Orthophoto files/directories should be missing
self.assertFalse(os.path.exists(task.assets_path("odm_orthophoto", "odm_orthophoto.tif")))