aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2015-01-30 15:02:01 +0100
committerMilo Casagrande <milo.casagrande@linaro.org>2015-01-30 15:02:01 +0100
commit26abfd1fd70ce4d8b245a6af3de6c77dc0f06bd3 (patch)
tree1695551b2614d614ac6a6ed304e2b11ec5b54c80
parent573cc073b49dc2e8f0a4965690b867af9205217f (diff)
doc: Fix example.
Change-Id: Ie3da6cb5b9adae07122867f08677bd646059a0a5
-rw-r--r--doc/examples.rst7
1 files changed, 2 insertions, 5 deletions
diff --git a/doc/examples.rst b/doc/examples.rst
index 8d18d25..bdd3bbf 100644
--- a/doc/examples.rst
+++ b/doc/examples.rst
@@ -449,12 +449,9 @@ Upload a single file
'Authorization': AUTHORIZATION_TOKEN
}
- files = {
- 'file': (open('/path/to/boot-arch.json', 'rb'))
- }
-
url = urljoin(BACKEND_URL, '/upload/next/next-20150116/arm64-allnoconfig/lab-name/boot-arch.json')
- response = requests.put(url, headers=headers, files=files)
+ with open('/path/to/boot-arch.json', 'rb') as upload_file:
+ response = requests.put(url, headers=headers, data=upload_file)
print response.content