Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 887180 Details for
Bug 923339
media-sound/whipper-0.10.0 fails when writing log file at the end
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
the modified PR543 patch
yaml-0.18.patch (text/plain), 2.09 KB, created by
Bill Prendergast
on 2024-03-09 13:56:26 UTC
(
hide
)
Description:
the modified PR543 patch
Filename:
MIME Type:
Creator:
Bill Prendergast
Created:
2024-03-09 13:56:26 UTC
Size:
2.09 KB
patch
obsolete
>From: https://github.com/whipper-team/whipper/pull/543 >From e0942417a1c267781a8b676789730457dcb2e6fa Mon Sep 17 00:00:00 2001 >From: Martin Weinelt <hexa@darmstadt.ccc.de> >Date: Sun, 20 Jun 2021 15:18:37 +0200 >Subject: [PATCH] Use custom YAML subclass to be compatible with > ruamel_yaml>=0.17 > >Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de> >--- > whipper/common/yaml.py | 18 ++++++++++++++++++ > whipper/result/logger.py | 11 ++++++----- > whipper/test/test_result_logger.py | 14 ++++++-------- > 3 files changed, 30 insertions(+), 13 deletions(-) > create mode 100644 whipper/common/yaml.py > >--- /dev/null >+++ b/whipper/common/yaml.py >@@ -0,0 +1,18 @@ >+from ruamel.yaml import YAML as ruamel_YAML >+from ruamel.yaml.compat import StringIO >+ >+# https://yaml.readthedocs.io/en/latest/example.html#output-of-dump-as-a-string >+class YAML(ruamel_YAML): >+ def __init__(self, *args, **kwargs): >+ super().__init__() >+ self.width = 4000 >+ self.default_flow_style = False >+ >+ def dump(self, data, stream=None, **kw): >+ inefficient = False >+ if stream is None: >+ inefficient = True >+ stream = StringIO() >+ ruamel_YAML.dump(self, data, stream, **kw) >+ if inefficient: >+ return stream.getvalue() >--- a/whipper/result/logger.py >+++ b/whipper/result/logger.py >@@ -1,12 +1,12 @@ > import time > import hashlib > import re >-import ruamel.yaml as yaml > from ruamel.yaml.comments import CommentedMap as OrderedDict > > import whipper > > from whipper.common import common >+from whipper.common.yaml import YAML > from whipper.result import result > > >@@ -148,11 +148,12 @@ def logRip(self, ripResult, epoch): > data["EOF"] = "End of status report" > riplog["Conclusive status report"] = data > >+ yaml = YAML( >+ typ="rt", >+ pure=True >+ ) > riplog = yaml.dump( >- riplog, >- default_flow_style=False, >- width=4000, >- Dumper=yaml.RoundTripDumper >+ riplog > ) > # Add a newline after the "Log creation date" line > riplog = re.sub(
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 923339
: 887180 |
887194
|
887195
|
887196