Skip to content

Commit

Permalink
flake8 fix
Browse files Browse the repository at this point in the history
Signed-off-by: utkarshbhatthere <[email protected]>
  • Loading branch information
UtkarshBhatthere committed Apr 4, 2023
1 parent c5b639f commit bc216db
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
run: |
set -eux
sudo microceph.radosgw-admin user create --uid=test --display-name=test > keys.json
sudo python3 ./github/scripts/appS3.py http://localhost:80 keys.json --obj-num 2
sudo python3 scripts/appS3.py http://localhost:80 keys.json --obj-num 2
- name: Upload artifacts
if: always()
Expand Down
2 changes: 0 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'sphinxenv']



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

Expand Down
15 changes: 12 additions & 3 deletions .github/scripts/appS3.py → scripts/appS3.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ def app_handle(args):
for obj, size in objects:
print("Object: {}/{} -> Size: {}MB".format(bucket_name, obj, size))

# Cleanup (if asked for)
if not args.no_delete:
print("Performing Cleanup")
for obj, size in objects:
client.Object(bucket_name, obj).delete()

def rand_str(length: int):
ret = "".join(
return "".join(
random.choices(string.ascii_uppercase + string.digits, k=length)
)
# print("TEST {}".format(ret))
return ret


if __name__ == "__main__":
Expand All @@ -81,6 +84,12 @@ def rand_str(length: int):
default=1,
help="Number of objects to upload to S3.",
)
argparse.add_argument(
"--no-delete",
type=bool,
default=False,
help="Setting this to true would not cleanup the pushed objects.",
)
argparse.set_defaults(func=app_handle)

# Parse the args.
Expand Down

0 comments on commit bc216db

Please sign in to comment.