Bug 727518 - [abrt] smolt-1.4.3-3.fc15: smolt.py:315:__init__:NameError: global name 'hostInfo' is not defined
Summary: [abrt] smolt-1.4.3-3.fc15: smolt.py:315:__init__:NameError: global name 'host...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: smolt
Version: 19
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Will Woods
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:e3c195f3606729976393f694e02...
: 727513 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-02 11:13 UTC by Mads Kiilerich
Modified: 2015-02-17 13:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 13:49:44 UTC


Attachments (Terms of Use)
A proposed patch. (2.50 KB, patch)
2011-08-12 17:32 UTC, Mads Kiilerich
no flags Details | Diff

Description Mads Kiilerich 2011-08-02 11:13:23 UTC
abrt version: 2.0.3
architecture:   i686
cmdline:        /usr/bin/python /usr/bin/smoltSendProfile
comment:        This codepath is apparently rarely used but uses an undefined module/variable
component:      smolt
executable:     /usr/bin/smoltSendProfile
kernel:         2.6.40-4.fc15.i686
os_release:     Fedora release 15 (Lovelock)
package:        smolt-1.4.3-3.fc15
reason:         smolt.py:315:__init__:NameError: global name 'hostInfo' is not defined
time:           Tue Aug  2 13:08:42 2011
uid:            0
username:       root

backtrace:
:smolt.py:315:__init__:NameError: global name 'hostInfo' is not defined
:
:Traceback (most recent call last):
:  File "/usr/bin/smoltSendProfile", line 152, in <module>
:    profile = smolt.get_profile()
:  File "/usr/share/smolt/client/smolt.py", line 1415, in get_profile
:    return Hardware()
:  File "/usr/share/smolt/client/smolt.py", line 1004, in Hardware
:    _hardware_instance = _Hardware()
:  File "/usr/share/smolt/client/smolt.py", line 591, in __init__
:    self.host = Host()
:  File "/usr/share/smolt/client/smolt.py", line 315, in __init__
:    self.systemModel = hostInfo.get('system.hardware.product')
:NameError: global name 'hostInfo' is not defined
:
:Local variables in innermost frame:
:tempform: 'i686'
:cpuInfo: {'count': 1, 'model_ver': '37', 'cpu_stepping': '5', 'speed': 3058, 'cache': '4096 KB', 'model_number': '6', 'bogomips': '6118.58', 'cpu_model_num': '37', 'platform': 'i386', 'other': 'fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc up arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm arat dts tpr_shadow vnmi flexpriority ept vpid', 'cpu_family': '6', 'model': 'Intel(R) Core(TM) i3 CPU         540  @ 3.07GHz', 'type': 'GenuineIntel', 'class': 'CPU', 'desc': 'Processor'}
:self: <smolt.Host instance at 0xa96276c>
:memory: {'ram': '3018', 'class': 'MEMORY', 'swap': '10047'}

Comment 1 Mads Kiilerich 2011-08-12 17:04:56 UTC
This seems be a consequence of partly removal of hal.

I don't know when this could happen. I think it happened when running on EFI machine with EFI disabled (which includes when running 32 bit Fedora on 64 bit EFI).

I propose something like this patch to:
* remove the wrong code fragments for the general and trivial case
* disable the special but broken code for ppc64 handling

--- /usr/share/smolt/client/smolt.py	2011-07-27 18:15:10.726563104 +0200
+++ smolt.py	2011-08-12 18:52:36.340121138 +0200
@@ -302,7 +302,6 @@
         self.platform = Gate().process('arch', tempform, WITHHELD_MAGIC_STRING)
 
         if Gate().grants('vendor'):
-            #self.systemVendor = hostInfo.get('system.vendor'
             self.systemVendor = cat('/sys/devices/virtual/dmi/id/sys_vendor')[0].strip()
             if not self.systemVendor:
                 self.systemVendor = 'Unknown'
@@ -312,10 +311,6 @@
         if Gate().grants('model'):
             self.systemModel = cat('/sys/devices/virtual/dmi/id/product_name')[0].strip() + ' ' + cat('/sys/devices/virtual/dmi/id/product_version')[0].strip()
             if not self.systemModel:
-                self.systemModel = hostInfo.get('system.hardware.product')
-                if hostInfo.get('system.hardware.version'):
-                    self.systemModel += ' ' + hostInfo.get('system.hardware.version')
-            if not self.systemModel:
                 self.systemModel = 'Unknown'
         else:
             self.systemModel = WITHHELD_MAGIC_STRING
@@ -329,7 +324,7 @@
         else:
             self.formfactor = WITHHELD_MAGIC_STRING
 
-        if tempform == 'ppc64':
+        if tempform == 'ppc64' and False: # FIXME: hal info is no longer available
             if hostInfo.get('openfirmware.model'):
                 if hostInfo['openfirmware.model'][:3] == 'IBM':
                     self.systemVendor = 'IBM'

I propose this as f16 NTH because crashes in bug reporting tools are very annoying.

Comment 2 Mads Kiilerich 2011-08-12 17:25:55 UTC
*** Bug 727513 has been marked as a duplicate of this bug. ***

Comment 3 Mads Kiilerich 2011-08-12 17:32:00 UTC
Created attachment 518068 [details]
A proposed patch.

Bug 727513 is closely related, so instead I propose this patch to fix them all.

Comment 4 Andre Robatino 2011-11-05 18:16:22 UTC
Still in F16 Gold (AKA RC5). The F16 updates were just enabled and there are no 0-day updates for smolt, either.

Comment 5 Flos Lonicerae 2011-11-15 14:22:55 UTC
Package: smolt-1.4.3-5.fc16
Architecture: i686
OS Release: Fedora release 16 (Verne)

Comment
-----
don't know

Comment 6 Per Sandberg 2012-02-01 05:47:54 UTC
Was reporting an error and requested !"smolt" info to be included.

Package: smolt-1.4.3-5.fc16
OS Release: Fedora release 16 (Verne)

Comment 7 Andre Robatino 2012-04-01 19:58:54 UTC
Bumping the Version to Rawhide in the hope of getting more attention, since there appear to be no builds for 17 or Rawhide that would fix this. This bug distorts the smolt statistics.

Comment 8 Fedora End Of Life 2013-04-03 18:01:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 9 Fedora End Of Life 2015-01-09 16:44:21 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Fedora End Of Life 2015-02-17 13:49:44 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.