Skip to content

Commit 7721700

Browse files
hertrstepkr4711
authored andcommitted
packages: patch oslo-log
Due to newer packages in nixos 26.05 we need a small patch for the old oslo-log to still work Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de> On-behalf-of: SAP stefan.kober@sap.com
1 parent bfb01ac commit 7721700

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

packages/oslo-log.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ python3Packages.buildPythonPackage rec {
5454
testtools
5555
];
5656

57+
patches = [
58+
./patches/oslo-log-pipe-mutex-context-manager.patch
59+
];
60+
5761
checkPhase = ''
5862
stestr run
5963
'';
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/oslo_log/pipe_mutex.py b/oslo_log/pipe_mutex.py
2+
index 08a1fe3..3aa4832 100644
3+
--- a/oslo_log/pipe_mutex.py
4+
+++ b/oslo_log/pipe_mutex.py
5+
@@ -136,6 +136,13 @@ class PipeMutex:
6+
# do, so nobody does it and that's okay.
7+
self.close()
8+
9+
+ def __enter__(self):
10+
+ self.acquire()
11+
+ return self
12+
+
13+
+ def __exit__(self, exc_type, exc_value, traceback):
14+
+ self.release()
15+
+
16+
17+
def pipe_createLock(self):
18+
"""Replacement for logging.Handler.createLock method."""

0 commit comments

Comments
 (0)