CBQE-0 make script compatible with python27

Change-Id: I46265dcab44154c46f3adc59191a09004e41926a
Reviewed-on: http://review.couchbase.org/37613
Reviewed-by: Andrei Baranouski <andrei.baranouski@gmail.com>
Tested-by: buildbot <build@couchbase.com>