[csw-devel] SF.net SVN: gar:[14343] csw/mgar/gar/v2/lib/python/csw_upload_pkg.py

Ben Walton bwalton at opencsw.org
Wed Apr 20 17:02:18 CEST 2011


Excerpts from wahwah's message of Wed Apr 20 10:54:31 -0400 2011:


Hi Maciej,

> +  def _SetAuth(self, c):
> +    """Set basic HTTP auth options on given Curl object."""
> +    if self.username:
> +      logging.debug("Using basic AUTH for user %s", self.username)
> +      c.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_ANY)
> +      c.setopt(pycurl.USERPWD, "%s:%s" % (self.username, self.password))
> +    else:
> +      logging.debug("User and password not set, not using HTTP AUTH")
> +    return c
> +

This is what I planned to tackle last night but I forgot about a
parent council meeting for my daughter's school.  It looks as though
the file read bit still needs to happen though, right?  (eg:
~/.csw-upload-pkg storing u/p)

Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302



More information about the devel mailing list