Doesn't work on Debian, because using is_alive instead of isAlive

Bug #565375 reported by Mathieu Parent
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usb-creator (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: usb-creator

using trunk version, compiled on Debian testing, I have the following errors:

<pre>
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.5/site-packages/usbcreator/install.py", line 148, in run
    self._failure(_('An uncaught exception was raised:\n%s') % str(e))
  File "/usr/lib/python2.5/site-packages/usbcreator/install.py", line 93, in _failure
    if self.progress_thread and self.progress_thread.is_alive():
AttributeError: 'progress' object has no attribute 'is_alive'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/usbcreator/frontends/gtk/frontend.py", line 660, in quit
    self.backend.cancel_install()
  File "/usr/lib/python2.5/site-packages/usbcreator/backends/udisks/backend.py", line 310, in cancel_install
    Backend.cancel_install(self)
  File "/usr/lib/python2.5/site-packages/usbcreator/backends/base/backend.py", line 189, in cancel_install
    if self.install_thread and self.install_thread.is_alive():
AttributeError: 'install' object has no attribute 'is_alive'
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/usbcreator/frontends/gtk/frontend.py", line 660, in quit
    self.backend.cancel_install()
  File "/usr/lib/python2.5/site-packages/usbcreator/backends/udisks/backend.py", line 310, in cancel_install
    Backend.cancel_install(self)
  File "/usr/lib/python2.5/site-packages/usbcreator/backends/base/backend.py", line 189, in cancel_install
    if self.install_thread and self.install_thread.is_alive():
AttributeError: 'install' object has no attribute 'is_alive'
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/usbcreator/frontends/gtk/frontend.py", line 660, in quit
    self.backend.cancel_install()
  File "/usr/lib/python2.5/site-packages/usbcreator/backends/udisks/backend.py", line 310, in cancel_install
    Backend.cancel_install(self)
  File "/usr/lib/python2.5/site-packages/usbcreator/backends/base/backend.py", line 189, in cancel_install
    if self.install_thread and self.install_thread.is_alive():
AttributeError: 'install' object has no attribute 'is_alive'
</pre>

This is due to the use of is_alive method which is not available in python < 2.6 (see http://groups.google.com/group/robotframework-devel/msg/7d1ec233dc392670?pli=1).

Solution: in usbcreator/install.py, replace all is_alive by isAlive.

Revision history for this message
komputes (komputes) wrote :

Mathieu, could you please clarify the steps taken to get this error. If it was an error in compilation or when using usb-creator. If you could attach a patch for usbcreator/install.py, this bug can be triaged. Also please test the latest code and post if this is still an issue.

Changed in usb-creator (Ubuntu):
status: New → Incomplete
Revision history for this message
Mathieu Parent (math-parent) wrote :

The bug is still here. See attached patch.

Both is_alive and isAlive are in docs (see http://docs.python.org/library/threading.html#threading.Thread.is_alive). But isAlive() is more conform to other methods: isDaemon, setDaemon, ...

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Confirming the issue. Will work on pushing this to trunk.

Changed in usb-creator (Ubuntu):
assignee: nobody → Dmitrijs Ledkovs (dmitrij.ledkov)
status: Incomplete → Confirmed
tags: added: patch
Revision history for this message
Mathieu Parent (math-parent) wrote :

New version of the patch (made with bzr diff).

Victor Vargas (kamus)
Changed in usb-creator (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Victor Vargas (kamus) wrote :

I have set status to triaged for now, so please be pacient and wait a response of usb-creator developers. Thanks!

Changed in usb-creator (Ubuntu):
status: Confirmed → Triaged
tags: added: patch-forwarded-upstream
removed: patch
Changed in usb-creator (Ubuntu):
assignee: Dmitrijs Ledkovs (xnox) → nobody
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Well, we use python3 now.

Changed in usb-creator (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.