Skip to content

Commit 0570cd7

Browse files
authored
Use native mkdir function if not exists (#44)
* `outdir` argument is already part of `Path` class so we can use direct mkdir function from it This cleanup commit 88759c8. Test: android-unpinner get-apks tech.httptoolkit.pinning_demo . -> passed android-unpinner get-apks tech.httptoolkit.pinning_demo test -> passed
1 parent 88759c8 commit 0570cd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android_unpinner/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def get_apks(package: str, outdir: Path) -> None:
364364
raise RuntimeError(f"Unxepected output from pm path: {package_info!r}")
365365
apks = [p.removeprefix("package:") for p in package_info.splitlines()]
366366
if not outdir.exists():
367-
Path.mkdir(outdir)
367+
outdir.mkdir()
368368
for apk in apks:
369369
logging.info(f"Getting {apk}...")
370370
outfile = outdir / Path(apk).name

0 commit comments

Comments
 (0)