On Fri, Dec 18, 2009 at 12:52, Steve Borho <st...@borho.org> wrote: > On Thu, Dec 17, 2009 at 9:08 PM, Yuki KODAMA <endflow....@gmail.com> wrote: >> On Fri, Dec 18, 2009 at 11:44, Steve Borho <st...@borho.org> wrote: >>> I get these two tracebacks from the import dialog on Linux. The >>> dialog still works as intended, so these are not fatal. >>> >>> File "/home/steve/tools/tortoisehg-dev/tortoisehg/hgtk/cslist.py", >>> line 689, in dnd_motion >>> if self.item_drag is not None: >>> AttributeError: 'ChangesetList' object has no attribute 'item_drag' >>> >>> Traceback (most recent call last): >>> File "/home/steve/tools/tortoisehg-dev/tortoisehg/hgtk/cslist.py", >>> line 706, in dnd_leave >>> self.teardown_dnd(pause=True) >>> File "/home/steve/tools/tortoisehg-dev/tortoisehg/hgtk/cslist.py", >>> line 411, in teardown_dnd >>> first = self.get_sep(0) >>> File "/home/steve/tools/tortoisehg-dev/tortoisehg/hgtk/cslist.py", >>> line 500, in get_sep >>> elif pos == len(self.showitems): >>> TypeError: object of type 'NoneType' has no len() >> >> Thanks for attention. >> If this error is reproducible, could you check whether it's occurred >> after importing my changes? >> I've just send a pull request to you. > > I still get the second one, here's a new traceback > > Traceback (most recent call last): > File "/home/steve/tools/tortoisehg-dev/tortoisehg/hgtk/cslist.py", > line 744, in dnd_leave > self.teardown_dnd(pause=True) > File "/home/steve/tools/tortoisehg-dev/tortoisehg/hgtk/cslist.py", > line 399, in teardown_dnd > first = self.get_sep(0) > File "/home/steve/tools/tortoisehg-dev/tortoisehg/hgtk/cslist.py", > line 488, in get_sep > elif pos == len(self.showitems): > TypeError: object of type 'NoneType' has no len() > > -- > Steve Borho >
Does this patch kill traceback? In my env, I couldn't reproduce it. diff --git a/tortoisehg/hgtk/cslist.py b/tortoisehg/hgtk/cslist.py --- a/tortoisehg/hgtk/cslist.py +++ b/tortoisehg/hgtk/cslist.py @@ -464,8 +464,8 @@ pos: Number, the position of separator you need. If -1 or list length, indicates the last separator. """ - # invalid position - if pos < -1: + # invalid position/condition + if pos < -1 or not self.showitems: return None def get_last(): child = self.csbox.get_children()[-1] -- Yuki KODAMA ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop