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

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