Einstein42 / myq-garage

Python Chamberlain Garage Door interface
MIT License
36 stars 16 forks source link

Bugs in myq_garage.py #13

Closed HopkinsHill closed 7 years ago

HopkinsHill commented 7 years ago

downloaded and encountered numerous little errors. Here is the list

  1. In many places print is missing (). Some places the syntax is correct.
  2. TOKENTTL is read from the config as a string. line 61 should be TOKENTTL = int(config.get('main', 'TOKENTTL')) else line 235 explodes without explicit conversion to int
  3. Line 267 Call to session.post has bad arguments... req=self.session.post(self.authurl, headers=self.headers, json=payload) should be req=self.session.post(self.authurl, headers=self.headers, data=payload).
  4. requests.packages.urllib3.disable_warnings() generates a method error. Commented this out to get to work
HopkinsHill commented 7 years ago

Also USE_ISY is expected to be a boolean on line 382. Therefore shouod be converted when config is loaded on line 64 with something like USE_ISY = config.get('ISYConfiguration', 'USE_ISY')=='True'

After these changes were fixed the code ran without errors and reported correct status

PockyBum522 commented 7 years ago

I fixed some of this in my pull request, it just needs to be merged.