(
name_executable,
in_file,
out_file,
output=subprocess.DEVNULL,
error=subprocess.DEVNULL,
run_async=False,
**kwargs,
)
| 70 | |
| 71 | |
| 72 | def osmupdate( |
| 73 | name_executable, |
| 74 | in_file, |
| 75 | out_file, |
| 76 | output=subprocess.DEVNULL, |
| 77 | error=subprocess.DEVNULL, |
| 78 | run_async=False, |
| 79 | **kwargs, |
| 80 | ): |
| 81 | env = os.environ.copy() |
| 82 | env["PATH"] = f"{settings.OSM_TOOLS_PATH}:{env['PATH']}" |
| 83 | p = subprocess.Popen( |
| 84 | [ |
| 85 | name_executable, |
| 86 | "--drop-author", |
| 87 | "--drop-version", |
| 88 | "--out-o5m", |
| 89 | "-v", |
| 90 | in_file, |
| 91 | out_file, |
| 92 | ], |
| 93 | env=env, |
| 94 | stdout=output, |
| 95 | stderr=error, |
| 96 | ) |
| 97 | if run_async: |
| 98 | return p |
| 99 | else: |
| 100 | wait_and_raise_if_fail(p) |
| 101 | |
| 102 | |
| 103 | def osmfilter( |
no test coverage detected