MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / __secure_name

Method __secure_name

scripts/dump_data.py:112–121  ·  view source on GitHub ↗

As we're writing to disk, we should get rid of all filesystem-specific symbols.

(self, name)

Source from the content-addressed store, hash-verified

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
124path_eve=path_eve

Callers 1

writeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected