Skip to content

Commit 7d16557

Browse files
committed
avoid registration fail in private case
1 parent f8add26 commit 7d16557

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pyclowder/connectors.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,12 @@ def register_extractor(self, endpoints):
519519

520520
for url in endpoints.split(','):
521521
if "unique_key" in data:
522-
if url.find("?") > -1: url += "&user=%s" % self.clowder_email
523-
else: url += "?user=%s" % self.clowder_email # TODO: This will not work, need an auth key matching email
522+
if url.find("?") > -1:
523+
url += "&user=%s" % self.clowder_email
524+
else:
525+
logger.info("Unable to register extractor without an API key.")
526+
return
527+
#url += "?user=%s" % self.clowder_email # TODO: This will not work, need an auth key matching email
524528
try:
525529
result = requests.post(url.strip(), headers=headers,
526530
data=json.dumps(data),

0 commit comments

Comments
 (0)