clean dropbox errors
1. set autorename feature 2. don't log an error unless there's an error!bugfix
parent
87732e31b7
commit
3b32e93dae
|
@ -49,7 +49,8 @@ class Dropbox (CloudStorage.CloudStorage):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
parameters = {
|
parameters = {
|
||||||
'path': '/' + self.fix_filename (session.ebook.get_filename ())
|
'path': '/' + self.fix_filename (session.ebook.get_filename ()),
|
||||||
|
'autorename': True,
|
||||||
}
|
}
|
||||||
headers = {
|
headers = {
|
||||||
'Authorization' : 'Bearer ' + str (session.token),
|
'Authorization' : 'Bearer ' + str (session.token),
|
||||||
|
@ -59,5 +60,6 @@ class Dropbox (CloudStorage.CloudStorage):
|
||||||
with closing (session.post (self.upload_endpoint,
|
with closing (session.post (self.upload_endpoint,
|
||||||
data = response.content,
|
data = response.content,
|
||||||
headers = headers)) as r:
|
headers = headers)) as r:
|
||||||
|
if 'error_summary' in r.text:
|
||||||
CloudStorage.error_log (r.text)
|
CloudStorage.error_log (r.text)
|
||||||
r.raise_for_status ()
|
r.raise_for_status ()
|
||||||
|
|
Loading…
Reference in New Issue