Remove a reader from a reader group

def removefromreadergroup(self, groupname):
        """Remove a reader from a reader group"""

        hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER)
        if 0 != hresult:
            raise EstablishContextException(hresult)
        try:
            hresult = SCardRemoveReaderFromGroup(hcontext, self.name,
                groupname)
            if 0 != hresult:
                raise RemoveReaderFromGroupException(hresult, self.name,
                    groupname)
        finally:
            hresult = SCardReleaseContext(hcontext)
            if 0 != hresult:
                raise ReleaseContextException(hresult)