Skip to content

Commit

Permalink
quick fix swift temp urls added
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Apr 27, 2017
1 parent a441798 commit 417cd3d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hummingbird/processes/wps_spotchecker.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

from compliance_checker.runner import ComplianceChecker, CheckSuite
from compliance_checker import __version__ as cchecker_version

Expand Down Expand Up @@ -79,6 +81,11 @@ def _handler(self, request, response):
dataset = request.inputs['dataset_opendap'][0].data
elif 'dataset' in request.inputs:
dataset = request.inputs['dataset'][0].file
# TODO: quick fix for swift temp urls
if '?' in dataset:
new_name = dataset.split('?', 1)[0]
os.rename(dataset, new_name)
dataset = new_name
else:
raise Exception("missing dataset to check.")

Expand Down

0 comments on commit 417cd3d

Please sign in to comment.