xiwrap

slightly higher-level container setup utility
git clone https://git.ce9e.org/xiwrap.git

commit
6ffd3a479ca20f3bec79bb559628ad3fab23d224
parent
af617ca0312f975c47f56856f751c6ae9b111b85
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2024-08-04 11:25
refactor: make cwd optional in push_rule

Diffstat

M xiwrap.py 6 +++---

1 files changed, 3 insertions, 3 deletions


diff --git a/xiwrap.py b/xiwrap.py

@@ -140,7 +140,7 @@ class RuleSet:
  140   140         if self.sync_fds is None:
  141   141             self.sync_fds = os.pipe2(0)
  142   142 
  143    -1     def push_rule(self, key, args, *, cwd):
   -1   143     def push_rule(self, key, args, *, cwd=None):
  144   144         if key == 'include':
  145   145             if len(args) != 1:
  146   146                 raise RuleError(key, args)
@@ -154,7 +154,7 @@ class RuleSet:
  154   154             if len(args) != 1:
  155   155                 raise RuleError(key, args)
  156   156             self.ensure_sync_fds()
  157    -1             self.push_rule('ro-bind', [DBUS_SESSION_SRC, DBUS_SESSION_DEST], cwd=None)
   -1   157             self.push_rule('ro-bind', [DBUS_SESSION_SRC, DBUS_SESSION_DEST])
  158   158             self.dbus_session[args[0]] = key.removeprefix('dbus-')
  159   159         elif key in [
  160   160             'dbus-system-see',
@@ -166,7 +166,7 @@ class RuleSet:
  166   166             if len(args) != 1:
  167   167                 raise RuleError(key, args)
  168   168             self.ensure_sync_fds()
  169    -1             self.push_rule('ro-bind', [DBUS_SYSTEM_SRC, DBUS_SYSTEM_DEST], cwd=None)
   -1   169             self.push_rule('ro-bind', [DBUS_SYSTEM_SRC, DBUS_SYSTEM_DEST])
  170   170             self.dbus_system[args[0]] = key.removeprefix('dbus-system-')
  171   171         elif key == 'setenv':
  172   172             var, value = self.parse_env(key, args)