writer/__init__.py: Fix UnboundLocalError
UnboundLocalError: local variable 'warnings' referenced before assignment was raised since a9fb7c733a4f