You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Went over the project code and encountered the following block of code under the accepts function that is unreachable:
...
try:
ifolefileandnotolefile.isOleFile(file_stream):
returnFalsefinally:
file_stream.seek(cur_pos)
# Brue force, check if it's an Outlook filetry:
ifolefileisnotNone: ->`unreachable`msg=olefile.OleFileIO(file_stream)
toc="\n".join([str(stream) forstreaminmsg.listdir()])
return (
"__properties_version1.0"intocand"__recip_version1.0_#00000000"intoc
)
exceptExceptionase:
passfinally:
file_stream.seek(cur_pos)
the reason the block is unreachable is because the If this condition is true — olefile is defined and the file is not an OLE file — it will return False immediately.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
Went over the project code and encountered the following block of code under the
accepts
function that is unreachable:the reason the block is unreachable is because the If this condition is true —
olefile
is defined and the file is not an OLE file — it will return False immediately.Would love to hear thoughts
Beta Was this translation helpful? Give feedback.
All reactions