Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Removing some weird import logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
garnaat committed Sep 29, 2011
1 parent e484aa4 commit 04c78b2
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions boto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
import boto
from boto.pyami.config import Config, BotoConfigLocations
from boto.storage_uri import BucketStorageUri, FileStorageUri
import boto.plugin
Expand Down Expand Up @@ -341,15 +340,15 @@ def connect_euca(host=None, aws_access_key_id=None, aws_secret_access_key=None,

# Check for values in boto config, if not supplied as args
if not aws_access_key_id:
aws_access_key_id = boto.config.get('Credentials',
'euca_access_key_id',
None)
aws_access_key_id = config.get('Credentials',
'euca_access_key_id',
None)
if not aws_secret_access_key:
aws_secret_access_key = boto.config.get('Credentials',
'euca_secret_access_key',
None)
aws_secret_access_key = config.get('Credentials',
'euca_secret_access_key',
None)
if not host:
host = boto.config.get('Boto', 'eucalyptus_host', None)
host = config.get('Boto', 'eucalyptus_host', None)

reg = RegionInfo(name='eucalyptus', endpoint=host)
return EC2Connection(aws_access_key_id, aws_secret_access_key,
Expand Down Expand Up @@ -379,15 +378,15 @@ def connect_walrus(host=None, aws_access_key_id=None, aws_secret_access_key=None

# Check for values in boto config, if not supplied as args
if not aws_access_key_id:
aws_access_key_id = boto.config.get('Credentials',
'euca_access_key_id',
None)
aws_access_key_id = config.get('Credentials',
'euca_access_key_id',
None)
if not aws_secret_access_key:
aws_secret_access_key = boto.config.get('Credentials',
'euca_secret_access_key',
None)
aws_secret_access_key = config.get('Credentials',
'euca_secret_access_key',
None)
if not host:
host = boto.config.get('Boto', 'walrus_host', None)
host = config.get('Boto', 'walrus_host', None)

return S3Connection(aws_access_key_id, aws_secret_access_key,
host=host, port=port, path=path,
Expand Down

0 comments on commit 04c78b2

Please sign in to comment.