pystemd
Advanced tools
+1
-1
| Metadata-Version: 2.4 | ||
| Name: pystemd | ||
| Version: 0.15.0 | ||
| Version: 0.15.1 | ||
| Summary: A systemd binding for python | ||
@@ -5,0 +5,0 @@ Author: Alvaro Leiva Geisse |
+1
-1
@@ -7,3 +7,3 @@ [build-system] | ||
| name = "pystemd" | ||
| version = "0.15.0" | ||
| version = "0.15.1" | ||
| readme = "README.md" | ||
@@ -10,0 +10,0 @@ description="A systemd binding for python" |
| Metadata-Version: 2.4 | ||
| Name: pystemd | ||
| Version: 0.15.0 | ||
| Version: 0.15.1 | ||
| Summary: A systemd binding for python | ||
@@ -5,0 +5,0 @@ Author: Alvaro Leiva Geisse |
@@ -13,4 +13,4 @@ # | ||
| # latest release. | ||
| __version__ = "0.15.0" | ||
| __version__ = "0.15.1" | ||
| sys.modules[__name__] = __version__ # type: ignore |
@@ -49,2 +49,3 @@ import os | ||
| user_mode=self.user_mode, | ||
| wait_for_activation=True, | ||
| extra={ | ||
@@ -51,0 +52,0 @@ **self.properties, |
+21
-8
@@ -60,2 +60,3 @@ # | ||
| wait=False, | ||
| wait_for_activation=False, | ||
| remain_after_exit=False, | ||
@@ -100,2 +101,4 @@ collect=False, | ||
| settings to the start_transient_unit method. | ||
| cwd: Working directory for the command. If not specified, systemd's | ||
| default working directory will be used. | ||
| machine: Machine name to execute the command, by default we connect to | ||
@@ -105,2 +108,5 @@ the host's dbus. | ||
| to False. | ||
| wait_for_activation: If True, wait only for the service to reach the | ||
| 'running' state, then return immediately without waiting for completion. | ||
| Defaults to False. | ||
| remain_after_exit: If True, the transient unit will remain after cmd | ||
@@ -265,3 +271,3 @@ has finished, also if true, this methods will return | ||
| unit = Unit(name, bus=bus, _autoload=True) | ||
| if wait: | ||
| if wait or wait_for_activation: | ||
| mstr = ( | ||
@@ -296,3 +302,3 @@ ( | ||
| while wait: | ||
| while wait or wait_for_activation: | ||
| events = sel.select(timeout=_wait_polling) | ||
@@ -331,10 +337,17 @@ _in = [key.fileobj for key, _ in events] | ||
| ): | ||
| _, message_job_path = m.body[1].get(b"Job", (0, b"/")) | ||
| if wait: | ||
| if ( | ||
| message_job_path != unit_start_job | ||
| and m.body[1].get(b"SubState") in EXIT_SUBSTATES | ||
| ): | ||
| break | ||
| elif wait_for_activation: | ||
| if ( | ||
| message_job_path == unit_start_job | ||
| and m.body[1].get(b"SubState") in (b"running",) | ||
| ): | ||
| break | ||
| if ( | ||
| message_job_path != unit_start_job | ||
| and m.body[1].get(b"SubState") in EXIT_SUBSTATES | ||
| ): | ||
| break | ||
| if _wait_polling and not _in and unit.Service.MainPID == 0: | ||
@@ -341,0 +354,0 @@ # on usermode the subscribe to events does not work that well |
+1
-1
@@ -66,3 +66,3 @@ #!/usr/bin/env python3 | ||
| name="pystemd", | ||
| version="0.15.0", | ||
| version="0.15.1", | ||
| author="Alvaro Leiva Geisse", | ||
@@ -69,0 +69,0 @@ author_email="aleivag@gmail.com", |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
3277742
0.02%2769
0.51%