Skip to content

Commit

Permalink
permit error if no session_id is available
Browse files Browse the repository at this point in the history
 * The dropbox provider should error if it can't get a session
   identifier.  A `KeyError` should suffice until we see what an
   actual error condition looks like.
  • Loading branch information
felliott committed Jul 26, 2018
1 parent 370ffb3 commit edd2208
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion waterbutler/providers/dropbox/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ async def _create_upload_session(self) -> str:
expects=(200, ),
throws=core_exceptions.UploadError
)
return (await resp.json()).get('session_id', None)
data = await resp.json()
return data['session_id']

async def _upload_parts(self, stream: streams.BaseStream, session_id: str) -> None:
"""Determines the necessary partitioning of the stream (based on max chunk size), and
Expand Down

0 comments on commit edd2208

Please sign in to comment.