Bug#728840: munin-plugins-extra: ipmi_sensor_ doesn't properly import os
Le 6 nov. 2013 21:33, Gabriel Filion gabs...@lelutin.ca a écrit : that's quite okay to fix it that way. however, please note that environ was not imported from os before, so I would expect this to fail as well: Ooops. Well it was handled by the commit fixing #686982, I guess I rebased my patch a little too early. Anyway, the code should be correct if you merge the patch in the debian 2.0.6 branch. If not, just also add the commit of the other bug. (I'll try to check that later)
Bug#728840: munin-plugins-extra: ipmi_sensor_ doesn't properly import os
tags 728840 + upstream fixed-upstream done On Wed, Nov 6, 2013 at 6:06 AM, Gabriel Filion gabs...@lelutin.ca wrote: simple fix would be to add a line import os before line 73 like this: Thx. Note that I just fixed [1] the offending call instead in e9e9f6b63c08d6e8c98ed8d518fdfab5320c. [1] http://mm0.eu/e9e9f6 -- Steve -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#728840: munin-plugins-extra: ipmi_sensor_ doesn't properly import os
On 06/11/13 03:06 PM, Steve Schnepp wrote: tags 728840 + upstream fixed-upstream done thanks for the quick response! On Wed, Nov 6, 2013 at 6:06 AM, Gabriel Filion gabs...@lelutin.ca wrote: simple fix would be to add a line import os before line 73 like this: Thx. Note that I just fixed [1] the offending call instead in e9e9f6b63c08d6e8c98ed8d518fdfab5320c. [1] http://mm0.eu/e9e9f6 that's quite okay to fix it that way. however, please note that environ was not imported from os before, so I would expect this to fail as well: 66 from os import stat, access, R_OK, F_OK 67 from os.path import join 68 from stat import ST_MTIME 69 from time import time 70 import sys 71 import re 72 73 CACHEDIR = environ['MUNIN_PLUGSTATE'] -- Gabriel Filion signature.asc Description: OpenPGP digital signature
Bug#728840: munin-plugins-extra: ipmi_sensor_ doesn't properly import os
Package: munin-plugins-extra Version: 2.0.6-4+deb7u1 Severity: normal with version 2.0.6-4 of munin-plugins-extra, I get the following stack trace when running the ipmi_sensor_ script: munin-run ipmi_sensor_u_degrees_c Traceback (most recent call last): File /etc/munin/plugins/ipmi_sensor_u_degrees_c, line 73, in module CACHEDIR = os.environ['MUNIN_PLUGSTATE'] NameError: name 'os' is not defined it would seem the script imports different things for the os library with from os import xyz but does not import the library directly. so near the beginning when it tries to get a variable from then environment, if crashes. simple fix would be to add a line import os before line 73 like this: - 8 - --- /usr/share/munin/plugins/ipmi_sensor_ 2013-06-09 11:41:52.0 -0400 +++ ipmi_sensor_2013-11-06 00:04:15.689850272 -0500 @@ -63,6 +63,7 @@ from subprocess import Popen, PIPE +import os from os import stat, access, R_OK, F_OK from os.path import join from stat import ST_MTIME -- 8 -- System Information: Debian Release: 7.2 APT prefers stable APT policy: (500, 'stable'), (500, 'oldstable') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_CA.utf8) Shell: /bin/sh linked to /bin/dash Versions of packages munin-plugins-extra depends on: ii munin-common 2.0.6-4+deb7u1 ii perl 5.14.2-21+deb7u1 munin-plugins-extra recommends no packages. Versions of packages munin-plugins-extra suggests: pn libnet-netmask-perl none pn libnet-telnet-perl none ii python 2.7.3-4+deb7u1 -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org