Menu

#209 global name 'our_udi' is not defined

closed-fixed
dccm (1)
5
2012-08-22
2012-02-07
Robert Dale
No

What you tried to do: plugin Trimble Nomad

What happened:
::::::::::::::
backtrace
::::::::::::::
synceconnector.py:349:signal_dccm:NameError: global name 'our_udi' is not defined

Traceback (most recent call last):
File "/usr/share/synce-connector/udev-synce-rndis", line 61, in <module>
if signal_dccm(device_path,device_ip,local_ip,True) == False:
File "/usr/share/synce-connector/synceconnector.py", line 349, in signal_dccm
logger.critical("failed to signal device connect to dccm device manager %s: %s" % (our_udi, e))
NameError: global name 'our_udi' is not defined

Local variables in innermost frame:
dccm_manager: <Interface <ProxyObject wrapping <dbus._dbus.SystemBus (system) at 0xb75ca3ec> :1.149 /org/synce/dccm/DeviceManagerControl at
0xb75ea0ac> implementing 'org.synce.dccm.DeviceManager.Control' at 0xb75ea12c>
local_ip: '169.254.2.2'
device_ip: '169.254.2.1'
dccm_log_level: '6'
rndis: True
device_path: '/devices/pci0000:00/0000:00:1d.0/usb6/6-2/6-2:1.0/net/eth0'
rndis_text: 'True'
::::::::::::::
cmdline
::::::::::::::
python /usr/share/synce-connector/udev-synce-rndis
::::::::::::::
component
::::::::::::::
synce-connector
::::::::::::::
executable
::::::::::::::
/usr/share/synce-connector/udev-synce-rndis
::::::::::::::
kernel
::::::::::::::
3.2.2-1.fc16.i686
::::::::::::::
os_release
::::::::::::::
Fedora release 16 (Verne)
::::::::::::::
package
::::::::::::::
synce-connector-0.15.2-4.fc16
::::::::::::::

This bug was also reported on Fedora at https://bugzilla.redhat.com/show_bug.cgi?id=760991

Discussion

  • Robert Dale

    Robert Dale - 2012-02-07

    Suggested fix:

    Use device_path instead of our_udi as in a previous logging statement...

    Patch:
    Index: trunk/connector/scripts/synceconnector.py.in
    ===================================================================
    --- trunk/connector/scripts/synceconnector.py.in (revision 4037)
    +++ trunk/connector/scripts/synceconnector.py.in (working copy)
    @@ -346,7 +346,7 @@
    try:
    dccm_manager.DeviceConnected(device_path, device_ip, local_ip, rndis)
    except:
    - logger.critical("failed to signal device connect to dccm device manager %s: %s" % (our_udi, e))
    + logger.critical("failed to signal device connect to dccm device manager %s: %s" % (device_path, e))
    return False

    return True

     
  • Robert Dale

    Robert Dale - 2012-02-07

    Another fix is needed because now the exception is not set...

    Index: trunk/connector/scripts/synceconnector.py.in

    --- trunk/connector/scripts/synceconnector.py.in (revision 4037)
    +++ trunk/connector/scripts/synceconnector.py.in (working copy)
    @@ -345,8 +345,8 @@

    try:
    dccm_manager.DeviceConnected(device_path, device_ip, local_ip, rndis)
    - except:
    - logger.critical("failed to signal device connect to dccm device manager %s: %s" % (our_udi, e))
    + except Exception,e:
    + logger.critical("failed to signal device connect to dccm device manager %s: %s" % (device_path, e))
    return False

    return True

     
  • David Eriksson

    David Eriksson - 2012-02-07
    • assigned_to: twogood --> mark_ellis
     
  • David Eriksson

    David Eriksson - 2012-02-07

    @Robert: I'm not doing any development in SynCE these days, but I took the liberty to add you to the project so that you can commit these fixes yourself, assuming Mark Ellis does not mind!

     
  • Robert Dale

    Robert Dale - 2012-02-08
    • status: open --> pending-fixed
     
  • Robert Dale

    Robert Dale - 2012-02-08

    fixed in trunk r4038

     
  • Mark Ellis

    Mark Ellis - 2012-08-22
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.