Update dictadapter.py

A fix for the issue described at #1972