'Get the login info as (username, password)
First look for the manually specified credentials using username_option
and password_option as keys in params dictionary. If no such credentials
available look in the netrc file using the netrc_machine or _NETRC_MACHINE
value.
If there\'s no info available, return (None, None)'

def _get_login_info(self, username_option=u'username', password_option=u'password', netrc_machine=None):

    if (self._downloader is None):
        return (None, None)
    downloader_params = self._downloader.params
    if (downloader_params.get(username_option) is not None):
        username = downloader_params[username_option]
        password = downloader_params[password_option]
    else:
        (username, password) = self._get_netrc_login_info(netrc_machine)
    return (username, password)
