Skip to content

Commit

Permalink
change the raise value error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
linchiahuisage committed Apr 29, 2021
1 parent 1d3151a commit 922106c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion synapseclient/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def store(args, syn):
if args.file and args.FILE:
raise ValueError('only specify one file')
if args.type == 'File' and not args.file and not args.FILE:
raise ValueError(f'For the {args.subparser} command, put the positional FILE as the first arg')
raise ValueError(f'{args.subparser} missing required FILE argument')
_descriptionFile_arg_check(args)

args.file = args.FILE if args.FILE is not None else args.file
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/synapseclient/unit_test_commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,4 +584,4 @@ def test_get__without_file_args(self):
args = parser.parse_args(['store', '--parentid', 'syn123', '--used', 'syn456'])
with pytest.raises(ValueError) as ve:
cmdline.store(args, self.syn)
assert str(ve.value) == "For the store command, put the positional FILE as the first arg"
assert str(ve.value) == "store missing required FILE argument"

0 comments on commit 922106c

Please sign in to comment.