-
Notifications
You must be signed in to change notification settings - Fork 65
add failsafe_deserialize #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -1486,6 +1486,25 @@ def _classify_target(self, target, data): | |||
pass # Target is not a Model, no classify | |||
return target, target.__class__.__name__ | |||
|
|||
def failsafe_deserialize(self, target_obj, response_data, content_type=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made the signature the same as __call__
, since I wanted calling failsafe_deserialize
the same as calling deserializer()
msrest/serialization.py
Outdated
:param str/dict data: The response data to deseralize. | ||
""" | ||
try: | ||
data = self._unpack_content(response_data, content_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added this content unpacking line, since call
does content unpacking of the data as well, and as this method doesn't enter __call__
, added this code here
Codecov Report
@@ Coverage Diff @@
## master #232 +/- ##
==========================================
+ Coverage 86.32% 87.05% +0.73%
==========================================
Files 25 25
Lines 2749 2835 +86
==========================================
+ Hits 2373 2468 +95
+ Misses 376 367 -9
Continue to review full report at Codecov.
|
No description provided.