Skip to content

Commit 4d6d814

Browse files
committed
version checks revert to single check location
1 parent 4e86e33 commit 4d6d814

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

pyclowder/connectors.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848

4949
import pyclowder.datasets
5050
import pyclowder.files
51-
import pyclowder.api.v1.files as v1files
52-
import pyclowder.api.v2.files as v2files
5351
import pyclowder.utils
5452

5553
import smtplib
@@ -441,18 +439,10 @@ def _process_message(self, body):
441439
found_local = False
442440
try:
443441
if check_result != pyclowder.utils.CheckMessage.bypass:
444-
if clowder_version == 2.0:
445-
file_metadata = v2files.download_info(self, host, secret_key, resource["id"])
446-
else:
447-
file_metadata = v1files.download_info(self, host, secret_key, resource["id"])
442+
file_metadata = pyclowder.files.download_info(self, host, secret_key, resource["id"])
448443
file_path = self._check_for_local_file(file_metadata)
449444
if not file_path:
450-
if clowder_version == 2.0:
451-
file_path = v2files.download(self, host, secret_key, resource["id"],
452-
resource["intermediate_id"],
453-
resource["file_ext"])
454-
else:
455-
file_path = v1files.download(self, host, secret_key, resource["id"],
445+
file_path = pyclowder.files.download(self, host, secret_key, resource["id"],
456446
resource["intermediate_id"],
457447
resource["file_ext"])
458448
else:

0 commit comments

Comments
 (0)