File: website-updates.patch

package info (click to toggle)
congruity 18-4
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,188 kB
  • sloc: python: 15,585; makefile: 52
file content (40 lines) | stat: -rw-r--r-- 1,731 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
commit 72979e314a36601ed38bb4fbc680256f5bc0c033
Author: Scott Talbert <swt@techie.net>
Date:   Sun Nov 1 15:33:01 2015 -0500
Subject: Fix setup/login URLs to match changes in web service
    
    NOTE: this patch will need to be cherry-picked by distributions to keep mhgui
    functional.

diff --git a/mhmanager.py b/mhmanager.py
index 6b9a06c..ec63279 100644
--- a/mhmanager.py
+++ b/mhmanager.py
@@ -162,7 +162,7 @@ class MHManager():
     # account.
     def Login(self, email, password):
         baseUrl = "https://setup.myharmony.com"
-        url = baseUrl + "/Home/TestLogin"
+        url = baseUrl + "/MartiniWeb/Home/TestLogin"
         params = urllib.urlencode({'username': email, 'password': password})
         request = urllib2.Request(url, params)
         response = urllib2.urlopen(request)
@@ -174,7 +174,7 @@ class MHManager():
         self.client.options.transport.cookiejar.extract_cookies(response,
                                                                 request)
 
-        url = baseUrl + "/Home/Login?usr=" + jsonResponse["Token"]
+        url = baseUrl + "/MartiniWeb/Home/Login?usr=" + jsonResponse["Token"]
         request = urllib2.Request(url)
         response = urllib2.urlopen(request)
         parser = LoginResponseHTMLParser()
@@ -476,7 +476,8 @@ class MHManager():
 
     def GetCountryLists(self):
         conn = httplib.HTTPSConnection("setup.myharmony.com")
-        conn.request("GET", "https://setup.myharmony.com/Account/Register")
+        conn.request("GET",
+                     "https://setup.myharmony.com/MartiniWeb/Account/Register")
         response = conn.getresponse()
         data = unicode(response.read(), 'utf-8')
         parser = CountryListHTMLParser()