use context manager when recovering partial registration
Merge pull request #253 from hughsaunders/de106

Merged automatically by jenkins after successful gate test