Skip to content

Commit

Permalink
Merge pull request Backblaze#905 from Shrinks99/--corsRules-helptext
Browse files Browse the repository at this point in the history
Updates `--corsRules` flag help text to specify what the command actually accepts
  • Loading branch information
ppolewicz authored Aug 14, 2023
2 parents 342ca6b + 7ab4568 commit a478fb0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Declare official support of Python 3.12
* Cache-Control option when uploading files

### Changed
* Better help text for --corsRules

### Infrastructure
* Remove unsupported PyPy 3.7 from tests matrix and add PyPy 3.10 instead
* Autocomplete integration tests will now work properly even if tested package has not been installed
Expand Down
14 changes: 12 additions & 2 deletions b2/console_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,12 @@ class CreateBucket(DefaultSseMixin, Command):
@classmethod
def _setup_parser(cls, parser):
parser.add_argument('--bucketInfo', type=json.loads)
parser.add_argument('--corsRules', type=json.loads)
parser.add_argument(
'--corsRules',
type=json.loads,
help=
"If given, the bucket will have a 'custom' CORS configuration. Accepts a JSON string."
)
parser.add_argument('--lifecycleRules', type=json.loads)
parser.add_argument(
'--fileLockEnabled',
Expand Down Expand Up @@ -2539,7 +2544,12 @@ class UpdateBucket(DefaultSseMixin, Command):
@classmethod
def _setup_parser(cls, parser):
parser.add_argument('--bucketInfo', type=json.loads)
parser.add_argument('--corsRules', type=json.loads)
parser.add_argument(
'--corsRules',
type=json.loads,
help=
"If given, the bucket will have a 'custom' CORS configuration. Accepts a JSON string."
)
parser.add_argument('--lifecycleRules', type=json.loads)
parser.add_argument(
'--defaultRetentionMode',
Expand Down

0 comments on commit a478fb0

Please sign in to comment.