Skip to content

Commit d45a23e

Browse files
committed
Fixed #100 - update the code to treat '+' as a valid charachter for
filenmae.
1 parent ba4e01f commit d45a23e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

about_code_tool/about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ def invalid_chars_in_about_file_name(file_path):
10161016
<li> uppercase and lowercase letters from A to Z</li>
10171017
<li> the _ underscore, - dash and . period signs. </li>
10181018
"""
1019-
supported = string.digits + string.ascii_letters + '_-.'
1019+
supported = string.digits + string.ascii_letters + '_-.+'
10201020
# Using the resource_name(file_path) will yield the following error on
10211021
# windows:
10221022
# Field: None, Value: [':', '\\', '\\', '\\', '\\', '\\', '\\'],

about_code_tool/tests/test_about.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,14 @@ def test_result_space_in_field_name(self):
185185

186186
def test_valid_chars_in_file_name(self):
187187
about_obj = about.AboutFile()
188-
name = string.digits + string.ascii_letters + '_-.'
188+
name = string.digits + string.ascii_letters + '_-.+'
189189
result = about_obj.invalid_chars_in_about_file_name(name)
190190
expected = []
191191
self.assertEqual(expected, result)
192192

193193
def test_result_chars_in_file_name(self):
194194
about_obj = about.AboutFile()
195-
result = about_obj.invalid_chars_in_about_file_name('_$as/afg:')
195+
result = about_obj.invalid_chars_in_about_file_name('_$a+s/afg:')
196196
expected = [':']
197197
self.assertEqual(expected, result)
198198

0 commit comments

Comments
 (0)