Skip to content

Commit

Permalink
Fix error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Aqcurate committed May 14, 2018
1 parent 19358d1 commit ba58e37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions steglsb.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ def _save_img(self, img, outfile):
print('[!] {} image could not be written.'.format(outfile))
print('[!] {}'.format(e))
sys.exit()
except KeyError as e:
print('[!] Format unable to be determined by filename.'.format(outfile))
except Exception as e:
print('[!] Unable to save file.')
print('[!] {}'.format(e))
sys.exit()

class LSBEncode(LSB):
def __init__(self, cover, secret, bits, outfile, mode=None):
Expand Down

0 comments on commit ba58e37

Please sign in to comment.