def mp_from_ids(s3server, mp_id, mp_keyname, mp_bucketname):
 if s3server['host']:
  conn = boto.connect_s3(aws_access_key_id=s3server['access_key'], aws_secret_access_key=s3server['secret_key'], is_secure=s3server['is_secure'], host=s3server['host'], port=s3server['port'], calling_format=boto.s3.connection.OrdinaryCallingFormat(), path=s3server['conn_path'])
 else:
  conn = S3Connection(s3server['access_key'], s3server['secret_key'])
 bucket = conn.lookup(mp_bucketname)
 mp = boto.s3.multipart.MultiPartUpload(bucket)
 mp.key_name = mp_keyname
 mp.id = mp_id
 return mp

def mp_from_ids ( s3server , mp_id , mp_keyname , mp_bucketname ) : if s3server [ 'host' ] : conn = boto . connect_s3 ( aws_access_key_id = s3server [ 'access_key' ] , aws_secret_access_key = s3server [ 'secret_key' ] , is_secure = s3server [ 'is_secure' ] , host = s3server [ 'host' ] , port = s3server [ 'port' ] , calling_format = boto . s3 . connection . OrdinaryCallingFormat ( ) , path = s3server [ 'conn_path' ] ) else : conn = S3Connection ( s3server [ 'access_key' ] , s3server [ 'secret_key' ] ) bucket = conn . lookup ( mp_bucketname ) mp = boto . s3 . multipart . MultiPartUpload ( bucket ) mp . key_name = mp_keyname mp . id = mp_id return mp
get the multipart upload from the bucket and multipart ids .