def _set_credentials(self, credentials):
        if not isinstance(credentials, tuple):
            raise PMException("Please specify the user credentials to log in to the CCU "
                              "like this: \"(username, password)\".")
        elif len(credentials) != 2:
            raise PMException("The credentials must be given as tuple of two elements.")
        elif not utils.is_string(credentials[0]):
            raise PMException("The username is of unhandled type.")
        elif not utils.is_string(credentials[1]):
            raise PMException("The password is of unhandled type.")

        self._credentials = credentials