Skip to content

Commit 51746cc

Browse files
Merge pull request #376 from TeamMsgExtractor/next-release
Fix issue with variable names
2 parents 3896db4 + d413069 commit 51746cc

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
**v0.42.1**
2+
* Fixed some constants being accessed with the wrong name (names were changed in reorganization).
3+
* Removed unused regular expression.
4+
15
**v0.42.0**
26
* [[TeamMsgExtractor #372](https://github.com/TeamMsgExtractor/msg-extractor/issues/372)] Changed the way that the save functions return a value. This makes the return value from all save functions much more informative, allowing a user to separate if a file or folder (or if more than one) was saved from the function. It also guarantees that all classes from this module will return the relevant path(s) if data is actually saved.
37
* [[TeamMsgExtractor #288](https://github.com/TeamMsgExtractor/msg-extractor/issues/288)] Added feature to allow attachment save functions to simply overwrite existing files of the same name. This can be done with the `overwriteExisting` keyword argument from code or the `--overwrite-existing` option from the command line.

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ your access to the newest major version of extract-msg.
242242
.. |License: GPL v3| image:: https://img.shields.io/badge/License-GPLv3-blue.svg
243243
:target: LICENSE.txt
244244

245-
.. |PyPI3| image:: https://img.shields.io/badge/pypi-0.42.0-blue.svg
246-
:target: https://pypi.org/project/extract-msg/0.42.0/
245+
.. |PyPI3| image:: https://img.shields.io/badge/pypi-0.42.1-blue.svg
246+
:target: https://pypi.org/project/extract-msg/0.42.1/
247247

248248
.. |PyPI2| image:: https://img.shields.io/badge/python-3.8+-brightgreen.svg
249249
:target: https://www.python.org/downloads/release/python-3816/

extract_msg/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
# along with this program. If not, see <http://www.gnu.org/licenses/>.
2828

2929
__author__ = 'Destiny Peterson & Matthew Walker'
30-
__date__ = '2023-07-29'
31-
__version__ = '0.42.0'
30+
__date__ = '2023-07-31'
31+
__version__ = '0.42.1'
3232

3333
__all__ = [
3434
# Modules:

extract_msg/attachments/attachment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def getFilename(self, **kwargs) -> str:
6262
customFilename = str(customFilename)
6363
# First we need to validate it. If there are invalid characters,
6464
# this will detect it.
65-
if constants.re.INVALID_FILENAME_CHARACTERS.search(customFilename):
65+
if constants.re.INVALID_FILENAME_CHARS.search(customFilename):
6666
raise ValueError('Invalid character found in customFilename. Must not contain any of the following characters: \\/:*?"<>|')
6767
filename = customFilename
6868
else:

extract_msg/attachments/custom_att.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def getFilename(self, **kwargs) -> str:
5757
customFilename = str(customFilename)
5858
# First we need to validate it. If there are invalid characters,
5959
# this will detect it.
60-
if constants.re.INVALID_FILENAME_CHARACTERS.search(customFilename):
60+
if constants.re.INVALID_FILENAME_CHARS.search(customFilename):
6161
raise ValueError('Invalid character found in customFilename. Must not contain any of the following characters: \\/:*?"<>|')
6262
filename = customFilename
6363
else:

extract_msg/attachments/emb_msg_att.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def getFilename(self, **kwargs) -> str:
5252
customFilename = str(customFilename)
5353
# First we need to validate it. If there are invalid characters,
5454
# this will detect it.
55-
if constants.re.INVALID_FILENAME_CHARACTERS.search(customFilename):
55+
if constants.re.INVALID_FILENAME_CHARS.search(customFilename):
5656
raise ValueError('Invalid character found in customFilename. Must not contain any of the following characters: \\/:*?"<>|')
5757
return customFilename
5858
else:

extract_msg/constants/re.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
"""
44

55
__all__ = [
6-
'BIN',
76
'HTML_BODY_START',
87
'HTML_SAN_SPACE',
9-
'INVALID_FILENAME_CHARACTERS',
8+
'INVALID_FILENAME_CHARS',
109
'INVALID_OLE_PATH',
1110
'RTF_ENC_BODY_START',
1211
]
@@ -24,9 +23,6 @@
2423
# Regular expression to find the start of the html body in encapsulated RTF.
2524
# This is used for one of the pattern types that makes life easy.
2625
RTF_ENC_BODY_START = re.compile(br'\{\\\*\\htmltag[0-9]* ?<body[^>]*>\}')
27-
# This is used in the workaround for decoding issues in RTFDE. We find `\bin`
28-
# sections and try to remove all of them to help with the decoding.
29-
BIN = re.compile(br'\\bin([0-9]+) ?')
3026
# Used in the vaildation of OLE paths. Any of these characters in a name make it
3127
# invalid.
3228
INVALID_OLE_PATH = re.compile(r'[:/\\!]')

0 commit comments

Comments
 (0)