Skip to content

Commit 92764d5

Browse files
committed
fix empty clowder_url
1 parent d08ea19 commit 92764d5

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## 2.3.4 - 2020-10-04
8+
9+
### Fixed
10+
- Extractor would not run in case clowder_url was ""
11+
712
## 2.3.3 - 2020-10-02
813

914
### Fixed

pyclowder/connectors.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -376,15 +376,17 @@ def _process_message(self, body):
376376
logger.debug(emailaddrlist)
377377
# source_host is original from the message, host is remapped to CLOWDER_URL if given
378378
source_host = body.get('host', '')
379-
host = self.clowder_url if self.clowder_url is not None else source_host
379+
host = self.clowder_url if self.clowder_url else source_host
380380
if host == '' or source_host == '':
381+
logging.error("Host is empty, this is bad.")
381382
return
382383
if not source_host.endswith('/'): source_host += '/'
383384
if not host.endswith('/'): host += '/'
384385
secret_key = body.get('secretKey', '')
385386
retry_count = 0 if 'retry_count' not in body else body['retry_count']
386387
resource = self._build_resource(body, host, secret_key)
387388
if not resource:
389+
logging.error("No resource found, this is bad.")
388390
return
389391

390392
# register extractor

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def description():
99

1010

1111
setup(name='pyclowder',
12-
version='2.3.3',
12+
version='2.3.4',
1313
packages=find_packages(),
1414
description='Python SDK for the Clowder Data Management System',
1515
long_description=description(),

0 commit comments

Comments
 (0)