RawApi: Fix Python3 incompatibility
(cmp() doesn't exist anymore)

Signed-off-by: Jerome Flesch <jflesch@gmail.com>