Commit 9b94bb17 by kimth

Default param is None rather than []

parent e2bca44c
...@@ -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,6 +98,7 @@ class XQueueInterface(object): ...@@ -98,6 +98,7 @@ class XQueueInterface(object):
payload = {'xqueue_header': header, payload = {'xqueue_header': header,
'xqueue_body' : body} 'xqueue_body' : body}
files = {} files = {}
if files_to_upload is not None:
for f in files_to_upload: for f in files_to_upload:
files.update({ f.name: f }) files.update({ f.name: f })
......
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