Browse Source

Fix typo in authorization and readme

main
root 8 years ago
parent
commit
b9cd34d4ec
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      README.md
  2. +2
    -2
      RainEagle/EagleClass.py

+ 1
- 1
README.md View File

@@ -11,7 +11,7 @@ Example :
import RainEagle

raineagle = RainEagle.Eagle( debug=0 , addr="10.1.1.39")
ret_data = eg.list_devices()
ret_data = raineagle.list_devices()

print "device MacID = ", ret_data['DeviceInfo']['DeviceMacId']
```


+ 2
- 2
RainEagle/EagleClass.py View File

@@ -809,8 +809,8 @@ class Eagle(object) :

if self.username is not None :
if self.debug :
print("Authorization string: "+base64.64encode(self.username+":"+self.password)"+\n")
req = urllib2.Request(url, commstr, headers={ "Authorization" : 'Basic'+base64.b64encode(self.username+":"+self.password) })
print("Authorization string: "+ base64.b64encode(self.username+":"+self.password))
req = urllib2.Request(url, commstr, headers={ "Authorization" : 'Basic ' + base64.b64encode(self.username+":"+self.password) })
else :
req = urllib2.Request(url, commstr)
response = urllib2.urlopen(req)


Loading…
Cancel
Save