Skip to content

Commit

Permalink
Fix for #53: no-region regression introduced by #51
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrossard committed Feb 21, 2017
1 parent 0a1e446 commit fd8bfbe
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.1.2 (2017-02-21)
- #53: Fix for no-region regression introduced by #51

## 1.1.1 (2017-02-16)
- #51: Add support for cn-north-1 region

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME = yum-plugin-s3-iam
VERSION = 1.1.1
VERSION = 1.1.2
RELEASE = 1
ARCH = noarch

Expand Down
7 changes: 3 additions & 4 deletions s3iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
__email__ = "[email protected]"
__copyright__ = "Copyright 2012, Julius Seporaitis"
__license__ = "Apache 2.0"
__version__ = "1.1.1"
__version__ = "1.1.2"


__all__ = ['requires_api_version', 'plugin_type', 'CONDUIT',
Expand Down Expand Up @@ -130,12 +130,11 @@ def __init__(self, repoid, repo):

if region:
self.baseurl = "https://s3-%s.amazonaws.com/%s%s" % (region, bucket, path)
if 'cn-north-1' in region:
self.baseurl = "https://s3.cn-north-1.amazonaws.com.cn/%s%s" % (bucket, path)
else:
self.baseurl = "https://%s.s3.amazonaws.com%s" % (bucket, path)

if 'cn-north-1' in region:
self.baseurl = "https://s3.cn-north-1.amazonaws.com.cn/%s%s" % (bucket, path)

self.name = repo.name
self.region = repo.region if repo.region else region
self.basecachedir = repo.basecachedir
Expand Down
3 changes: 3 additions & 0 deletions yum-plugin-s3-iam.spec
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ rm -rf ${RPM_BUILD_ROOT}
/usr/lib/yum-plugins/s3iam.py*

%changelog
* Tue Feb 21 2017 Mathias Brossard <[email protected]> 1.1.2-1
- Fix for no-region regression introduced by cn-north-1 region support

* Thu Feb 16 2017 Mathias Brossard <[email protected]> 1.1.1-1
- Add support for cn-north-1 region

Expand Down

0 comments on commit fd8bfbe

Please sign in to comment.