As we're writing to disk, we should get rid of all filesystem-specific symbols.
(self, name)
| 110 | f.write(data_bytes) |
| 111 | |
| 112 | def __secure_name(self, name): |
| 113 | """ |
| 114 | As we're writing to disk, we should get rid of all |
| 115 | filesystem-specific symbols. |
| 116 | """ |
| 117 | # Prefer safe way - replace any characters besides |
| 118 | # alphanumeric and few special characters with |
| 119 | # underscore |
| 120 | writer_safe_name = re.sub(r'[^\w\-.,() ]', '_', name, flags=re.UNICODE) |
| 121 | return writer_safe_name |
| 122 | |
| 123 | |
| 124 | path_eve=path_eve |