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
1=== modified file 'swoffsite.py'
2--- swoffsite.py 2023-10-11 03:18:48 +0000
3+++ swoffsite.py 2023-10-11 03:44:22 +0000
4@@ -1,4 +1,4 @@
5-#!/usr/bin/python3
6+#!/usr/bin/python
7
8 ## XXX: This is a stub
9
10
11=== modified file 'swoffsite/mirror.py'
12--- swoffsite/mirror.py 2023-10-11 03:18:48 +0000
13+++ swoffsite/mirror.py 2023-10-11 03:44:22 +0000
14@@ -18,7 +18,7 @@
15
16 __all__ = ['s3_walk', 'swift_walk', 'mirror_swift_to_s3']
17
18-from io import StringIO
19+from cStringIO import StringIO
20 from datetime import datetime, timedelta, tzinfo
21 import fnmatch
22 import multiprocessing
23@@ -76,7 +76,7 @@
24
25 Returns (container, name, md5)
26 '''
27- assert isinstance(s3_key_name, str)
28+ assert isinstance(s3_key_name, basestring)
29 container, rest = s3_key_name.split('/', 1)
30 assert rest.endswith('.gpg')
31 rest = rest[:-4]
32@@ -313,7 +313,7 @@
33 log.debug("NOT DRYRUN, actual upload to S3")
34 s3_bucket = s3_con.get_bucket(bucket, validate=False)
35 s3_key = s3_bucket.new_key(get_s3_name(container, name, md5))
36- for k, v in list(swift_headers.items()):
37+ for k, v in swift_headers.items():
38 if k in UNWANTED_SWIFT_METADATA:
39 # Ignore HTTP headers smooshed with our metadata,
40 # and similar.
41@@ -362,7 +362,7 @@
42 content_type = None
43 content_length = None
44 is_dlo = False
45- for k, v in list(s3_key.metadata.items()):
46+ for k, v in s3_key.metadata.items():
47 if k in UNWANTED_SWIFT_METADATA:
48 continue
49 if k == 'content-type':
50
51=== modified file 'swoffsite/streams.py'
52--- swoffsite/streams.py 2023-10-11 01:54:38 +0000
53+++ swoffsite/streams.py 2023-10-11 03:44:22 +0000
54@@ -59,7 +59,7 @@
55
56 def _next_chunk(self):
57 try:
58- return next(self._chunks)
59+ return self._chunks.next()
60 except StopIteration:
61 return None
62

Subscribers

People subscribed via source and target branches

to all changes: