GoogleCloudPlatform / GoogleCloudPlatform/gsutil
Cannot use ':' value in `-m` option with `gsutil notifications` command
- Dominant language
- Python
- Stars
- 918
- Forks
- 335
- PR merge metrics
- No merged PRs in 30d
Description
Custom attribute values cannot contain `:` character in `-m` option with `gsutil notifications`.
We can't escape, so can't specify the time like this:
`gsutil notifications create -m TIME:"12:00" ...`
The key-value of the custom attribute is simply split by `:` in `notification.py`, which raises an exception.
```notification.py
elif o == '-m':
if ':' not in a:
raise CommandException(
'Custom attributes specified with -m should be of the form '
'key:value')
key, value = a.split(':')
custom_attributes[key] = value
```
Contributor guide
Research direction
Start in notification.py at the -m option parsing shown in the issue. Check how custom attribute values containing colons should be accepted while the key:value requirement remains enforced; done means the example with TIME:"12:00" is parsed successfully without the existing validation being lost.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100