Update dictadapter.py

A fix for the issue described at #1972
Merge pull request #1973 from Abestanis/patch-1

Update dictadapter.py