Skip to content

Commit

Permalink
Merge pull request #20 from clowder-framework/fix-clowder-url
Browse files Browse the repository at this point in the history
fix empty clowder_url
  • Loading branch information
robkooper authored Oct 5, 2020
2 parents d08ea19 + 92764d5 commit b852c63
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 2.3.4 - 2020-10-04

### Fixed
- Extractor would not run in case clowder_url was ""

## 2.3.3 - 2020-10-02

### Fixed
Expand Down
4 changes: 3 additions & 1 deletion pyclowder/connectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,15 +376,17 @@ def _process_message(self, body):
logger.debug(emailaddrlist)
# source_host is original from the message, host is remapped to CLOWDER_URL if given
source_host = body.get('host', '')
host = self.clowder_url if self.clowder_url is not None else source_host
host = self.clowder_url if self.clowder_url else source_host
if host == '' or source_host == '':
logging.error("Host is empty, this is bad.")
return
if not source_host.endswith('/'): source_host += '/'
if not host.endswith('/'): host += '/'
secret_key = body.get('secretKey', '')
retry_count = 0 if 'retry_count' not in body else body['retry_count']
resource = self._build_resource(body, host, secret_key)
if not resource:
logging.error("No resource found, this is bad.")
return

# register extractor
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def description():


setup(name='pyclowder',
version='2.3.3',
version='2.3.4',
packages=find_packages(),
description='Python SDK for the Clowder Data Management System',
long_description=description(),
Expand Down

0 comments on commit b852c63

Please sign in to comment.