Skip to content

Commit

Permalink
work around an issue with SSL verification for buckets with . in the …
Browse files Browse the repository at this point in the history
…their names
  • Loading branch information
dryan committed May 27, 2015
1 parent bee11c9 commit 599e173
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions d3ploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Notification Center code borrowed from https://github.com/maranas/pyNotificationCenter/blob/master/pyNotificationCenter.py

VERSION = '2.0.7'
VERSION = '2.1.0'

import os, sys, json, re, hashlib, argparse, urllib, time, base64, ConfigParser, gzip, mimetypes, zipfile, signal, Queue, threading
from xml.dom import minidom
Expand Down Expand Up @@ -100,6 +100,8 @@ def bail(*args, **kwargs):
except ImportError:
alert("Please install boto. `pip install boto`", os.EX_UNAVAILABLE)

from boto.s3.connection import OrdinaryCallingFormat

try:
import Foundation, objc
notifications = True
Expand Down Expand Up @@ -307,7 +309,10 @@ def upload_files(env):
if KEY is None or SECRET is None:
alert("AWS credentials were not found. See https://gist.github.com/dryan/5317321 for more information.", os.EX_NOINPUT)

s3connection = boto.connect_s3(KEY, SECRET)
if '.' in bucket:
s3connection = boto.connect_s3(KEY, SECRET, calling_format=OrdinaryCallingFormat())
else:
s3connection = boto.connect_s3(KEY, SECRET)

# test the bucket connection
try:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
boto==2.14.0
boto==2.38.0

0 comments on commit 599e173

Please sign in to comment.