Merge lp:~barryprice/swoffsite/revert-to-py2 into lp:swoffsite

Proposed by Barry Price
Status: Merged
Approved by: 🤖 Canonical IS Review Bot
Approved revision: 52
Merged at revision: 51
Proposed branch: lp:~barryprice/swoffsite/revert-to-py2
Merge into: lp:swoffsite
Diff against target: 61 lines (+6/-6)
3 files modified
swoffsite.py (+1/-1)
swoffsite/mirror.py (+4/-4)
swoffsite/streams.py (+1/-1)
To merge this branch: bzr merge lp:~barryprice/swoffsite/revert-to-py2
Reviewer Review Type Date Requested Status
🤖 Canonical IS Review Bot Approve
Haw Loeung +1 Approve
Canonical IS Reviewers Pending
Review via email: mp+453284@code.launchpad.net

Commit message

Revert the previous changes, we'll stick with py2 for now

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Haw Loeung (hloeung) wrote :

LGTM

review: Approve (+1)
Revision history for this message
🤖 Canonical IS Review Bot (canonical-is-reviewbot) wrote :

Proxy approval for hloeung

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 51

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'swoffsite.py'
--- swoffsite.py 2023-10-11 03:18:48 +0000
+++ swoffsite.py 2023-10-11 03:44:22 +0000
@@ -1,4 +1,4 @@
1#!/usr/bin/python31#!/usr/bin/python
22
3## XXX: This is a stub3## XXX: This is a stub
44
55
=== modified file 'swoffsite/mirror.py'
--- swoffsite/mirror.py 2023-10-11 03:18:48 +0000
+++ swoffsite/mirror.py 2023-10-11 03:44:22 +0000
@@ -18,7 +18,7 @@
1818
19__all__ = ['s3_walk', 'swift_walk', 'mirror_swift_to_s3']19__all__ = ['s3_walk', 'swift_walk', 'mirror_swift_to_s3']
2020
21from io import StringIO21from cStringIO import StringIO
22from datetime import datetime, timedelta, tzinfo22from datetime import datetime, timedelta, tzinfo
23import fnmatch23import fnmatch
24import multiprocessing24import multiprocessing
@@ -76,7 +76,7 @@
7676
77 Returns (container, name, md5)77 Returns (container, name, md5)
78 '''78 '''
79 assert isinstance(s3_key_name, str)79 assert isinstance(s3_key_name, basestring)
80 container, rest = s3_key_name.split('/', 1)80 container, rest = s3_key_name.split('/', 1)
81 assert rest.endswith('.gpg')81 assert rest.endswith('.gpg')
82 rest = rest[:-4]82 rest = rest[:-4]
@@ -313,7 +313,7 @@
313 log.debug("NOT DRYRUN, actual upload to S3")313 log.debug("NOT DRYRUN, actual upload to S3")
314 s3_bucket = s3_con.get_bucket(bucket, validate=False)314 s3_bucket = s3_con.get_bucket(bucket, validate=False)
315 s3_key = s3_bucket.new_key(get_s3_name(container, name, md5))315 s3_key = s3_bucket.new_key(get_s3_name(container, name, md5))
316 for k, v in list(swift_headers.items()):316 for k, v in swift_headers.items():
317 if k in UNWANTED_SWIFT_METADATA:317 if k in UNWANTED_SWIFT_METADATA:
318 # Ignore HTTP headers smooshed with our metadata,318 # Ignore HTTP headers smooshed with our metadata,
319 # and similar.319 # and similar.
@@ -362,7 +362,7 @@
362 content_type = None362 content_type = None
363 content_length = None363 content_length = None
364 is_dlo = False364 is_dlo = False
365 for k, v in list(s3_key.metadata.items()):365 for k, v in s3_key.metadata.items():
366 if k in UNWANTED_SWIFT_METADATA:366 if k in UNWANTED_SWIFT_METADATA:
367 continue367 continue
368 if k == 'content-type':368 if k == 'content-type':
369369
=== modified file 'swoffsite/streams.py'
--- swoffsite/streams.py 2023-10-11 01:54:38 +0000
+++ swoffsite/streams.py 2023-10-11 03:44:22 +0000
@@ -59,7 +59,7 @@
5959
60 def _next_chunk(self):60 def _next_chunk(self):
61 try:61 try:
62 return next(self._chunks)62 return self._chunks.next()
63 except StopIteration:63 except StopIteration:
64 return None64 return None
6565

Subscribers

People subscribed via source and target branches

to all changes: