Commits

UENISHI Kota  committed c73b65e

script

  • Participants
  • Parent commits b4dfe09

Comments (0)

Files changed (2)

File python/clean_up_multipart.py

+import boto, sys
+from boto.s3.connection import S3Connection
+
+conn = S3Connection(sys.argv[1], sys.argv[2])
+bucket = conn.get_bucket(sys.argv[0])
+mpu = bucket.list_multipart_uploads()
+for mp in mpu:
+    mp.cancel_upload()
+    print(unicode(mp))

File python/print_all_mp.py

+import boto, sys
+from boto.s3.connection import S3Connection
+print(sys.argv)
+conn = S3Connection(sys.argv[2], sys.argv[3])
+bucket = conn.get_bucket(sys.argv[1])
+mpu = bucket.list_multipart_uploads()
+for mp in mpu:
+    print(unicode(mp))
+else:
+    print("no mp found.")