Synchronize mailinglist subscriptions using https instead of http
authorMagnus Hagander <magnus@hagander.net>
Mon, 13 Aug 2012 11:25:07 +0000 (13:25 +0200)
committerMagnus Hagander <magnus@hagander.net>
Mon, 13 Aug 2012 11:25:07 +0000 (13:25 +0200)
listsync.py

index d29c7e702f63520505c1db9492652f767bba3b21..359086f9a12cb1f40f1f7c6ee2ceb888b353292f 100755 (executable)
@@ -30,7 +30,7 @@ class MajordomoInterface:
                and screenscrape the result of the 'who-short' command.
                """
 
-               f = urlopen("http://%s/mj/mj_wwwadm?passw=%s&list=%s&func=who-short" % 
+               f = urlopen("https://%s/mj/mj_wwwadm?passw=%s&list=%s&func=who-short" %
                        (self.mjhost, self.listpwd, self.listname))
                s = f.read()
                f.close()
@@ -81,8 +81,8 @@ class MajordomoInterface:
                        'passw': self.listpwd
                })
                body = urlencode(var)
-               
-               h = httplib.HTTP(self.mjhost)
+
+               h = httplib.HTTPS(self.mjhost)
                h.putrequest('POST', '/mj/mj_wwwadm')
                h.putheader('host', self.mjhost)
                h.putheader('content-type','application/x-www-form-urlencoded')