| Index: third_party/gsutil/boto/boto/mturk/connection.py
|
| diff --git a/third_party/gsutil/20110627/boto/boto/mturk/connection.py b/third_party/gsutil/boto/boto/mturk/connection.py
|
| similarity index 98%
|
| rename from third_party/gsutil/20110627/boto/boto/mturk/connection.py
|
| rename to third_party/gsutil/boto/boto/mturk/connection.py
|
| index b5bc670ae19a81fb940a99361ae4eb225bc7561f..375da5a145c859094cd009a3d3a0a55ec6b98213 100644
|
| --- a/third_party/gsutil/20110627/boto/boto/mturk/connection.py
|
| +++ b/third_party/gsutil/boto/boto/mturk/connection.py
|
| @@ -41,7 +41,7 @@ class MTurkConnection(AWSQueryConnection):
|
| APIVersion = '2008-08-02'
|
|
|
| def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
|
| - is_secure=False, port=None, proxy=None, proxy_port=None,
|
| + is_secure=True, port=None, proxy=None, proxy_port=None,
|
| proxy_user=None, proxy_pass=None,
|
| host=None, debug=0,
|
| https_connection_factory=None):
|
| @@ -94,7 +94,8 @@ class MTurkConnection(AWSQueryConnection):
|
| if qual_req is not None:
|
| params.update(qual_req.get_as_params())
|
|
|
| - return self._process_request('RegisterHITType', params)
|
| + return self._process_request('RegisterHITType', params, [('HITTypeId', HITTypeId)])
|
| +
|
|
|
| def set_email_notification(self, hit_type, email, event_types=None):
|
| """
|
| @@ -560,8 +561,8 @@ class MTurkConnection(AWSQueryConnection):
|
|
|
| test_duration: the number of seconds a worker has to complete the test.
|
|
|
| - auto_granted: if True, requests for the Qualification are granted immediately.
|
| - Can't coexist with a test.
|
| + auto_granted: if True, requests for the Qualification are granted
|
| + immediately. Can't coexist with a test.
|
|
|
| auto_granted_value: auto_granted qualifications are given this value.
|
|
|
| @@ -572,7 +573,7 @@ class MTurkConnection(AWSQueryConnection):
|
| 'QualificationTypeStatus' : status,
|
| }
|
| if retry_delay is not None:
|
| - params['RetryDelay'] = retry_delay
|
| + params['RetryDelayInSeconds'] = retry_delay
|
|
|
| if test is not None:
|
| assert(isinstance(test, QuestionForm))
|
| @@ -590,7 +591,7 @@ class MTurkConnection(AWSQueryConnection):
|
| # Eventually someone will write an AnswerKey class.
|
|
|
| if auto_granted:
|
| - assert(test is False)
|
| + assert(test is None)
|
| params['AutoGranted'] = True
|
| params['AutoGrantedValue'] = auto_granted_value
|
|
|
| @@ -629,14 +630,14 @@ class MTurkConnection(AWSQueryConnection):
|
| params['QualificationTypeStatus'] = status
|
|
|
| if retry_delay is not None:
|
| - params['RetryDelay'] = retry_delay
|
| + params['RetryDelayInSeconds'] = retry_delay
|
|
|
| if test is not None:
|
| assert(isinstance(test, QuestionForm))
|
| params['Test'] = test.get_as_xml()
|
|
|
| if test_duration is not None:
|
| - params['TestDuration'] = test_duration
|
| + params['TestDurationInSeconds'] = test_duration
|
|
|
| if answer_key is not None:
|
| if isinstance(answer_key, basestring):
|
| @@ -820,6 +821,13 @@ class HIT(BaseAutoResultElement):
|
| # are we there yet?
|
| expired = property(_has_expired)
|
|
|
| +class HITTypeId(BaseAutoResultElement):
|
| + """
|
| + Class to extract an HITTypeId structure from a response
|
| + """
|
| +
|
| + pass
|
| +
|
| class Qualification(BaseAutoResultElement):
|
| """
|
| Class to extract an Qualification structure from a response (used in
|
| @@ -908,7 +916,5 @@ class QuestionFormAnswer(BaseAutoResultElement):
|
| def endElement(self, name, value, connection):
|
| if name == 'QuestionIdentifier':
|
| self.qid = value
|
| - elif name in ['FreeText', 'SelectionIdentifier'] and self.qid:
|
| - self.fields.append((self.qid,value))
|
| - elif name == 'Answer':
|
| - self.qid = None
|
| + elif name in ['FreeText', 'SelectionIdentifier', 'OtherSelectionText'] and self.qid:
|
| + self.fields.append( value )
|
|
|