summaryrefslogtreecommitdiff
path: root/boto/ses/__init__.py
diff options
context:
space:
mode:
authorJordonPhillips <phjordon@amazon.com>2016-12-20 13:20:27 -0800
committerJordonPhillips <phjordon@amazon.com>2017-02-10 10:18:00 -0800
commit74daf341e29618bac1b905b98fe783b09b2d389a (patch)
treeef2425a46c29d64abf6c05153ccb766d18e24519 /boto/ses/__init__.py
parent0f6ac4d14366d5178f4967c4e4a3e8806912a413 (diff)
downloadboto-74daf341e29618bac1b905b98fe783b09b2d389a.tar.gz
Use generic connect function
This points all the existing `connect_to_region` functions to the generic `connect` function within regioninfo.
Diffstat (limited to 'boto/ses/__init__.py')
-rw-r--r--boto/ses/__init__.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/boto/ses/__init__.py b/boto/ses/__init__.py
index ee324516..aab03e3d 100644
--- a/boto/ses/__init__.py
+++ b/boto/ses/__init__.py
@@ -22,6 +22,7 @@
from boto.ses.connection import SESConnection
from boto.regioninfo import RegionInfo, get_regions
+from boto.regioninfo import connect
def regions():
@@ -46,7 +47,5 @@ def connect_to_region(region_name, **kw_params):
:return: A connection to the given region, or None if an invalid region
name is given
"""
- for region in regions():
- if region.name == region_name:
- return region.connect(**kw_params)
- return None
+ return connect('ses', region_name, connection_cls=SESConnection,
+ **kw_params)