[packagekit] Enums in Python

Richard Hughes hughsient at gmail.com
Tue Nov 6 13:05:15 PST 2007


On Tue, 2007-11-06 at 21:57 +0100, Tom Parker wrote:
> On 06/11/2007, Richard Hughes <hughsient at gmail.com> wrote:
> > NameError: global name 'FILTER_NON_INSTALLED' is not defined
> 
> And this would be because of "do we call it not installed or
> available" problem.

Ahh yes, of course.

> Multiple ways to fix it:
> 1) Replace all python usages of FILTER_NON_INSTALLED with FILTER_AVAILABLE
> 2) Change pk-enum.c to replace PK_FILTER_ENUM_AVAILABLE with
> PK_FILTER_ENUM_NON_INSTALLED (and all the relevant changes elsewhere
> in the codebase)

I think use this opportunity to do 4) and use

PK_FILTER_ENUM_DEVELOPMENT
PK_FILTER_ENUM_INSTALLED
PK_FILTER_ENUM_GUI
PK_FILTER_ENUM_NOT_DEVELOPMENT
PK_FILTER_ENUM_NOT_INSTALLED
PK_FILTER_ENUM_NOT_GUI

I don't like NON in the name, it doesn't sound right. If this is okay I
can make the change trivially. Tom, is this okay?

Richard.





More information about the PackageKit mailing list