Skip to content

Commit 0fa3edb

Browse files
authored
Merge pull request #61 from bpeckNR/migratemonitorillegalcharacters
Fix migrating monitors that contain illegal characters
2 parents b36bf51 + 27ce4a9 commit 0fa3edb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/localstore.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def load_monitors(account_id, timestamp, monitor_names):
211211

212212

213213
def load_monitor(monitors_dir, monitor_name):
214-
adjusted_name = monitor_name
214+
adjusted_name = sanitize(monitor_name)
215215
if os.name == win_names.WINDOWS:
216216
adjusted_name = win_names.get_adjusted_name(monitors_dir, monitor_name)
217217
monitor_dir = monitors_dir / adjusted_name
@@ -279,8 +279,8 @@ def create_output_file(file_name):
279279

280280

281281
def sanitize(name):
282-
# illegal_characters = ['/', '?', '<', '>', '\\', ':', '*', '|']
283-
illegal_characters = ['/', '?', '<', '>', '\\', '*', '|']
282+
illegal_characters = ['/', '?', '<', '>', '\\', ':', '*', '|']
283+
# illegal_characters = ['/', '?', '<', '>', '\\', '*', '|']
284284
characters = list(name)
285285
for index, character in enumerate(characters):
286286
if characters[index] in illegal_characters:

0 commit comments

Comments
 (0)