summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2025-07-02 06:10:08 +0200
committerHelmut Grohne <helmut@subdivi.de>2025-07-02 06:10:08 +0200
commit7bc68c5bee3741183e4a5b170b8e34ce779bcfff (patch)
tree246d0c504b0c89610fec2f3fa75b2c546b01c2e3 /examples
parent37aecdf8a1fda1c21c936c1b94ba15184394fc92 (diff)
downloadpython-linuxnamespaces-7bc68c5bee3741183e4a5b170b8e34ce779bcfff.tar.gz
fix unschroot_proc.py to work from the examples directory
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/unschroot_proc.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/unschroot_proc.py b/examples/unschroot_proc.py
index 271a898..5894680 100755
--- a/examples/unschroot_proc.py
+++ b/examples/unschroot_proc.py
@@ -37,6 +37,9 @@ import uuid
import platformdirs
+if __file__.split("/")[-2:-1] == ["examples"]:
+ sys.path.insert(0, "/".join(__file__.split("/")[:-2]))
+
import asyncvarlink
import asyncvarlink.serviceinterface
import linuxnamespaces