[1.7.x] Fixed syntax error in ogrinspect.py management command.

Backport of f384b638e2 from master