mirror of
https://github.com/kiviktnm/decman.git
synced 2026-09-19 12:08:28 +00:00
Add an example for using decman
This commit is contained in:
@@ -8,3 +8,13 @@ class Example(decman.Plugin):
|
||||
|
||||
def available(self) -> bool:
|
||||
return os.path.exists("/tmp/example_plugin_available")
|
||||
|
||||
def process_modules(self, store: decman.Store, modules: set[decman.Module]):
|
||||
# Toy example for setting modules as changed
|
||||
for module in modules:
|
||||
module._changed = True
|
||||
|
||||
def apply(
|
||||
self, store: decman.Store, dry_run: bool = False, params: list[str] | None = None
|
||||
) -> bool:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user