Skip to content

Commit

Permalink
Merge pull request #475 from NYUCCL/fix-shell-invalid-aws-cred-messaging
Browse files Browse the repository at this point in the history
switch order of quiet and aws_wrapper check
  • Loading branch information
deargle committed Mar 16, 2021
2 parents 1d4d6b0 + 8240c57 commit 9f86efd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 3.0.4
### Fixed
- fix shell's error during hit_create that prevented ad url from showing.
- fix shell's messaging about invalid aws credentials

## 3.0.3
### Fixed
Expand Down
7 changes: 5 additions & 2 deletions psiturk/psiturk_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,11 @@ def amt_services_wrapper(self):
'- `psiturk server on`',
'- `psiturk server off`',
'- `psiturk debug -p`'])
message = '{}{}'.format(e.message, still_can_do)
message = e.message
if not self.quiet:
message = '{}{}'.format(message, still_can_do)
self.perror(message)
sys.exit()
except PsiturkException as e:
self.poutput(e)

Expand Down Expand Up @@ -146,7 +149,7 @@ def __init__(self, config, server, mode='sandbox', quiet=False):
self.quiet = quiet
self.feedback_to_output = True

if not self.amt_services_wrapper and not self.quiet:
if not self.quiet and not self.amt_services_wrapper:
sys.exit()

if not self.quiet:
Expand Down

0 comments on commit 9f86efd

Please sign in to comment.