python: fix build; getvar() was removed, expand it

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>