Merge ~pieq/bugit/+git/qabro:fix-1903229-acpidump-arm into bugit:master

Proposed by Pierre Equoy
Status: Merged
Approved by: Vic Liu
Approved revision: 860abc75e374d764bf2719b62065173cd2961678
Merged at revision: c6ca921c84755fb96675108f6aac3a62a75508d7
Proposed branch: ~pieq/bugit/+git/qabro:fix-1903229-acpidump-arm
Merge into: bugit:master
Diff against target: 20 lines (+8/-2)
1 file modified
qabro/bug_assistant.py (+8/-2)
Reviewer Review Type Date Requested Status
Vic Liu Approve
Review via email: mp+393431@code.launchpad.net

Description of the change

See linked bug and commit message for more info.

The original code raised an exception within qabro resulting in no logs being attached.

To post a comment you must log in.
Revision history for this message
Vic Liu (zongminl) wrote :

lgtm +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/qabro/bug_assistant.py b/qabro/bug_assistant.py
index f8630e4..7af347c 100644
--- a/qabro/bug_assistant.py
+++ b/qabro/bug_assistant.py
@@ -340,8 +340,14 @@ class AttachmentAssistant:
340 p = os.getenv('PATH')340 p = os.getenv('PATH')
341 if p:341 if p:
342 command = ["sudo", "env", "PATH={}".format(p), "acpidump-acpica"]342 command = ["sudo", "env", "PATH={}".format(p), "acpidump-acpica"]
343 output = subprocess.check_output(command)343 process = subprocess.run(command,
344 self.attachments['acpidump.log'] = output344 stdout=subprocess.PIPE,
345 stderr=subprocess.PIPE)
346 if process.returncode == 0:
347 self.attachments['acpidump.log'] = process.stdout
348 else:
349 print("Error while running acpidump:")
350 print(process.stderr)
345 else:351 else:
346 print("$PATH missing. Cannot run acpidump!")352 print("$PATH missing. Cannot run acpidump!")
347353

Subscribers

People subscribed via source and target branches

to all changes: