Skip to content

Commit

Permalink
Merge pull request #129 from globusonline/develop
Browse files Browse the repository at this point in the history
v0.3.17 Release
  • Loading branch information
NickolausDS authored Oct 28, 2020
2 parents 558e52b + 1894a4f commit 3ee0215
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
Below are major changes for each version Release. For detailed information,
see the list of commits from the last version or use `git log`.

## 0.3.17 - 2020-10-28

- Fix bugs in python 3.5
- Remove F strings and other python 3.6 features


## 0.3.16 - 2020-10-20

- Added broad exception handling on facet_modifiers
Expand Down
7 changes: 4 additions & 3 deletions globus_portal_framework/gclients.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def get_service_url(service_name):
env = get_globus_environment()
if service_name in CUSTOM_ENVS:
if env not in CUSTOM_ENVS[service_name]:
err = (f'Service {service_name} has no service url for the '
f'configured environment: "{env}"')
err = ('Service {} has no service url for the '
'configured environment: "{}"'.format(service_name, env))
raise exc.GlobusPortalException('InvalidEnv', err)
return CUSTOM_ENVS[service_name][env]
return globus_sdk.config.get_service_url(env, service_name)
Expand Down Expand Up @@ -173,7 +173,8 @@ def get_user_groups(user):
# Attempt to load the access token for Globus Groups. The scope name will
# change Sept 23rd, at which point attempting to fetch via the old name
# can be removed.
groups_url = f'{get_service_url("groups")}{GLOBUS_GROUPS_V2_MY_GROUPS}'
groups_service = get_service_url('groups')
groups_url = '{}{}'.format(groups_service, GLOBUS_GROUPS_V2_MY_GROUPS)
headers = {'Authorization': 'Bearer ' + token}
response = requests.get(groups_url, headers=headers)
try:
Expand Down
2 changes: 1 addition & 1 deletion globus_portal_framework/gsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ def get_facets(search_result, portal_defined_facets, filters,
for fmodder in facet_modifiers:
try:
facets = import_string(fmodder)(facets)
except ModuleNotFoundError:
except ImportError:
# Don't catch these. Developer error.
raise
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion globus_portal_framework/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def process_exception(self, request, exception):
'session_message',
'Your current account does not have sufficient access to this '
'resource, but one of your linked identities does. Please '
'login with one of those identities listed below.'
'login with one of those identities listed below: {}'
.format([g['username'] for g in allowed_user_member_groups])
)
# strategy does not handle lists well, so we need to encode the
Expand Down
2 changes: 1 addition & 1 deletion globus_portal_framework/tests/test_gsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def test_facet_modifiers_do_not_raise_non_import_exceptions(self):
mock_mods = ['globus_portal_framework.tests.test_gsearch.exc_mod']
get_facets(search_response, MOCK_PORTAL_DEFINED_FACETS, [],
filter_match=None, facet_modifiers=mock_mods)
self.asserTrue(exc_mod.called)
self.assertTrue(exc_mod.called)

def test_get_invalid_search_range_raises_error(self):
with self.assertRaises(GlobusPortalException):
Expand Down
2 changes: 1 addition & 1 deletion globus_portal_framework/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.3.16'
__version__ = '0.3.17'
2 changes: 1 addition & 1 deletion globus_portal_framework/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def detail_transfer(request, index, subject):
context['detail_error'] = tapie
log.error('File not found: {}'.format(tapie.message))
elif tapie.code not in ['EndpointPermissionDenied']:
log.error('Unexpected Error found during transfer request'
log.error('Unexpected Error found during transfer request: {}'
''.format(tapie))
except ValueError as ve:
log.error(ve)
Expand Down

0 comments on commit 3ee0215

Please sign in to comment.