Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#13178 closed Patch - Bug Fix (fixed)

Fix reading run level for smolt hardware profile on system with systemd

Reported by: jaham@… Owned by: Stuart Auchterlonie
Priority: minor Milestone: 30.0
Component: MythTV - General Version: Master Head
Severity: medium Keywords: smolt, hardware profile
Cc: Ticket locked: no

Description

On systems with systemd determining the run level via /sbin/runlevel fails which triggers an exception. The code catches the exception and writes an error message to stderr. The error message is translated using the i18n function _(). However the file software.py is missing the appropriate import which causes it to fail with "NameError?: global name '_' is not defined". Adding the correct import statement "from i18n import _" fixes the error.

Attachments (1)

fix_read_runlevel_systemd.diff (398 bytes) - added by jaham@… 6 years ago.
Patch fixing missing import

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by jaham@…

Patch fixing missing import

comment:1 Changed 6 years ago by Stuart Auchterlonie

Milestone: needs_triage30.0
Owner: set to Stuart Auchterlonie
Status: newaccepted
Version: UnspecifiedMaster Head

comment:2 Changed 6 years ago by Stuart Auchterlonie

Status: acceptedinfoneeded

Can I get a copy of the output from /sbin/runlevel on a system which triggers this exception?

Regards Stuart

comment:3 Changed 6 years ago by jaham@…

The output is "unknown" (without the quotes).

comment:4 Changed 6 years ago by Stuart Auchterlonie

Status: infoneededassigned

comment:5 Changed 5 years ago by Stuart Auchterlonie <stuarta@…>

Resolution: fixed
Status: assignedclosed

In 0a0d02c9df/mythtv:

Fixes #13178 - Fix reading runlevel for smolt hardware profile when using systemd

comment:6 Changed 5 years ago by Stuart Auchterlonie <stuarta@…>

In 0a0d02c9df/mythtv:

Fixes #13178 - Fix reading runlevel for smolt hardware profile when using systemd

comment:7 Changed 5 years ago by Stuart Auchterlonie <stuarta@…>

In 0a0d02c9df/mythtv:

Fixes #13178 - Fix reading runlevel for smolt hardware profile when using systemd

Note: See TracTickets for help on using tickets.