[PyKDE] Minor changes to eric to support old project files...

Detlev Offenbach detlev at die-offenbachs.de
Mon Jan 23 19:26:32 GMT 2006


Am Montag, 23. Januar 2006 17:39 schrieb Mike C. Fletcher:
> Hi all, just updated to Eric 3.8.1 (running on Gentoo).  Basically none
> of my projects would load (they were originally generated from an old
> script, but have since been saved by Eric).  There were 3 lines that
> needed changes to get them to load:
>
> Project/Project.py line 221 assumes the presence of sourceKey in the
> sourceExtensions dictionary, suggest using get with a default empty
> tuple/list:
>
>         for ext in self.sourceExtensions.get(sourceKey,[]):

That should not happen. The method containing the above line should only be 
called for recent project files. Please try to debug it or send a project 
file, that causes this problem.

>
> VCS/cvsPackage/ProjectBrowserHelper.py line 190 and 305 assume that they
> get a valid menu.  On my system it's getting None.  

Can you please check the Programming Language settings of your project?. It 
should be Python or Ruby.

> I just return in 
> that case:
>
>     def addVCSMenu(self, menu):
>         """
>         Public method used to add the VCS menu to all project browsers.
>
>         @param menu reference to the menu to be amended
>         """
>         if not menu:
>             return False
> ...
>
>     def addVCSMenuBack(self, menu):
>         """
>         Public method used to add the VCS menu to all project browsers.
>
>         @param menu reference to the menu to be amended
>         """
>         if not menu:
>             return False
> ...
>
> Those last two are obviously just hacks, but they do let Eric finish
> loading the files (the first one prevents loading entirely, the second
> two leave the mouse cursor in a "waiting" state, which is somewhat
> annoying to work with).
>
> Have fun,
> Mike

Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de




More information about the PyQt mailing list