ok, I was just commenting and didn't really read the context. There are several other places in gdaltools in which this test is done, and may fail there if the test is specifically for None (vs. e.g. empty string)