On Mon, Nov 01, 1999 at 09:29:15PM -0500, Edward Muller wrote:
> I just tried something like this:
>
> if gnome.config.get_string("/App/Section/Setting") == "None":
> writedefaults()
>
>
> it didn't work.
>
> this did:
>
> if str(gnome.config.get_string("/App/Section/Setting")) == "None":
> writedefaults()
>
> I had to cast the return from gnome.config.get_string as a string to
> make it work.
gnome.config.get_string returns a None object if the key isn't
found. This is like NULL. Your test should be:
if str(gnome.config.get_string("/App/Section/Setting")) == None
Matt
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]