From 9b94bb17e4fd78c1b2da3eb9b18753160a3cea35 Mon Sep 17 00:00:00 2001 From: kimth Date: Sun, 19 Aug 2012 12:19:10 -0400 Subject: [PATCH] Default param is None rather than [] --- common/lib/capa/capa/xqueue_interface.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/lib/capa/capa/xqueue_interface.py b/common/lib/capa/capa/xqueue_interface.py index 40c88b72f8..10f36636b8 100644 --- a/common/lib/capa/capa/xqueue_interface.py +++ b/common/lib/capa/capa/xqueue_interface.py @@ -65,7 +65,7 @@ class XQueueInterface(object): self.auth = django_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. @@ -98,8 +98,9 @@ class XQueueInterface(object): payload = {'xqueue_header': header, 'xqueue_body' : body} files = {} - for f in files_to_upload: - files.update({ f.name: f }) + if files_to_upload is not None: + for f in files_to_upload: + files.update({ f.name: f }) return self._http_post(self.url+'/xqueue/submit/', payload, files=files)