Skip to content

Commit

Permalink
#64: Excluding non covered code.
Browse files Browse the repository at this point in the history
  • Loading branch information
MotaDan committed Nov 22, 2016
1 parent 0225fad commit 115cc6e
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions steganographer/steganographer.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,20 +166,11 @@ def _reveal_string(self, hidden_data):
a string.
"""
revealed_data = self._reveal_data(hidden_data)
# null_pos = 0
#
# for i in range(len(revealed_data)):
# if revealed_data[i] != 0:
# null_pos += 1
# else:
# break
#
# revealed_data = revealed_data[:null_pos]

try:
revealed_string = revealed_data.decode()
except UnicodeDecodeError:
print("There was a problem reading the hidden message.")
revealed_string = revealed_data.decode('utf-8')
except UnicodeDecodeError: # pragma: no cover
print("The hidden message could not be decoded.")
sys.exit()

return revealed_string
Expand Down

0 comments on commit 115cc6e

Please sign in to comment.