Commit f55f896611ebb8a1f58fcb2d39c4bd2bf6526f51
1 parent
8d15762e
common/errors: improved the error messages for encrypted files
Showing
1 changed file
with
2 additions
and
2 deletions
oletools/common/errors.py
| ... | ... | @@ -14,7 +14,7 @@ class CryptoLibNotImported(CryptoErrorBase, ImportError): |
| 14 | 14 | |
| 15 | 15 | def __init__(self): |
| 16 | 16 | super(CryptoLibNotImported, self).__init__( |
| 17 | - 'msoffcrypto-tools could not be imported') | |
| 17 | + 'msoffcrypto-tools is not installed. Please run "pip install msoffcrypto-tool" or see https://github.com/nolze/msoffcrypto-tool') | |
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | class UnsupportedEncryptionError(CryptoErrorBase): |
| ... | ... | @@ -29,7 +29,7 @@ class WrongEncryptionPassword(CryptoErrorBase): |
| 29 | 29 | """Exception thrown if encryption could be handled but passwords wrong.""" |
| 30 | 30 | def __init__(self, filename=None): |
| 31 | 31 | super(WrongEncryptionPassword, self).__init__( |
| 32 | - 'Given passwords could not decrypt office file{}' | |
| 32 | + 'Given passwords could not decrypt office file{}, use option -p to specify the password' | |
| 33 | 33 | .format('' if filename is None else ' ' + filename)) |
| 34 | 34 | |
| 35 | 35 | ... | ... |