summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications/lang/php.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/applications/lang/php.py')
-rw-r--r--test/unit/applications/lang/php.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/unit/applications/lang/php.py b/test/unit/applications/lang/php.py
index 2ab172b0..ac59ec1b 100644
--- a/test/unit/applications/lang/php.py
+++ b/test/unit/applications/lang/php.py
@@ -1,4 +1,4 @@
-import os
+from pathlib import Path
import shutil
from unit.applications.proto import ApplicationProto
@@ -15,10 +15,9 @@ class ApplicationPHP(ApplicationProto):
if kwargs.get('isolation') and kwargs['isolation'].get('rootfs'):
rootfs = kwargs['isolation']['rootfs']
- if not os.path.exists(f'{rootfs}/app/php/'):
- os.makedirs(f'{rootfs}/app/php/')
+ Path(f'{rootfs}/app/php/').mkdir(parents=True, exist_ok=True)
- if not os.path.exists(f'{rootfs}/app/php/{script}'):
+ if not Path(f'{rootfs}/app/php/{script}').exists():
shutil.copytree(script_path, f'{rootfs}/app/php/{script}')
script_path = f'/app/php/{script}'