modified condition to handle Python v2.6.6