summaryrefslogtreecommitdiffstats
path: root/plugins/python/regress/plugin_conflict.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/python/regress/plugin_conflict.py')
-rw-r--r--plugins/python/regress/plugin_conflict.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/python/regress/plugin_conflict.py b/plugins/python/regress/plugin_conflict.py
new file mode 100644
index 0000000..3632193
--- /dev/null
+++ b/plugins/python/regress/plugin_conflict.py
@@ -0,0 +1,11 @@
+import sudo
+
+import sys
+
+sys.path = []
+
+class ConflictPlugin(sudo.Plugin):
+ def __init__(self, plugin_options, **kwargs):
+ sudo.log_info("PATH before: {} (should be empty)".format(sys.path))
+ sys.path = [sudo.options_as_dict(plugin_options).get("Path")]
+ sudo.log_info("PATH set: {}".format(sys.path))