inventory: Fix syntax error message on Python 2.6