Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
storagedriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
4
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
63579fd2
authored
Nov 11, 2019
by
Bálint Máhonfai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flake8 warning
parent
4b88e9f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
disk.py
+7
-5
No files found.
disk.py
View file @
63579fd2
...
...
@@ -285,12 +285,14 @@ class Disk(object):
with
open
(
exported_path
,
'rb'
)
as
exported_disk
:
try
:
m
=
MultipartEncoder
(
{
'data'
:
(
exported_name
+
'.'
+
format_dict
[
format
],
exported_disk
)}
{
'data'
:
(
exported_name
+
'.'
+
format_dict
[
format
],
exported_disk
)}
)
response
=
requests
.
post
(
upload_link
,
data
=
m
,
headers
=
{
'Content-Type'
:
m
.
content_type
},
params
=
{
'no_redirect'
:
''
})
response
=
requests
.
post
(
upload_link
,
data
=
m
,
headers
=
{
'Content-Type'
:
m
.
content_type
},
params
=
{
'no_redirect'
:
''
})
if
response
.
status_code
!=
200
:
raise
Exception
(
"Invalid response status code:
%
s"
%
response
.
status_code
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment