Skip to content

Commit

Permalink
fix: b2 bucket list syntax changed
Browse files Browse the repository at this point in the history
  • Loading branch information
robinvandernoord committed Aug 15, 2024
1 parent 921275a commit 0b01298
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/edwh_b2_plugin/b2_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __post_init__(self, js: dict, ctx: Context, quick: bool = False):
def _get_bucket(cls, ctx, name: str, quick: bool):
return json.loads(
ctx.run(
f'b2 get-bucket {"" if quick else "--showSize"} {name}',
f'b2 bucket get {"" if quick else "--show-size"} {name}',
hide=True,
).stdout
)
Expand Down Expand Up @@ -81,9 +81,6 @@ def authenticate(c):
)
def list_buckets(ctx, quick=False, bucket=None, purge=None, purge_filter=r".*\.(tgz|log|gz)"):
all_buckets = {b["bucketName"]: b for b in json.loads(ctx.run("b2 bucket list --json", hide=True).stdout)}

print(ctx.run("b2 bucket list --json"))

buckets_js = []
if not bucket:
buckets_js.extend(all_buckets.values())
Expand Down

0 comments on commit 0b01298

Please sign in to comment.