Commit b4eaa451 by kimth

Default param is None rather than []

parent e558684e
...@@ -65,7 +65,7 @@ class XQueueInterface(object): ...@@ -65,7 +65,7 @@ class XQueueInterface(object):
self.auth = django_auth self.auth = django_auth
self.session = requests.session(auth=requests_auth) self.session = requests.session(auth=requests_auth)
def send_to_queue(self, header, body, files_to_upload=[]): def send_to_queue(self, header, body, files_to_upload=None):
''' '''
Submit a request to xqueue. Submit a request to xqueue.
...@@ -98,8 +98,9 @@ class XQueueInterface(object): ...@@ -98,8 +98,9 @@ class XQueueInterface(object):
payload = {'xqueue_header': header, payload = {'xqueue_header': header,
'xqueue_body' : body} 'xqueue_body' : body}
files = {} files = {}
for f in files_to_upload: if files_to_upload is not None:
files.update({ f.name: f }) for f in files_to_upload:
files.update({ f.name: f })
return self._http_post(self.url+'/xqueue/submit/', payload, files=files) return self._http_post(self.url+'/xqueue/submit/', payload, files=files)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment