File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -178,9 +178,12 @@ def __init__(self, device):
178178 if sys .version_info [0 ] == 3 :
179179 import urllib .parse as URL
180180 import get_data_3 as get_data
181+ import six
182+ password = six .b (self .device ['password' ])
181183 elif sys .version_info [0 ] == 2 :
182184 import urllib as URL
183185 import get_data_2 as get_data
186+ password = str (self .device ['password' ])
184187 system_type = platform .system ()
185188 utils_extension = ''
186189 if system_type == 'Darwin' :
@@ -191,7 +194,7 @@ def __init__(self, device):
191194 utils_exe = "%s/%s/GetData%s" % (utils_dir , system_type , utils_extension )
192195 try :
193196 passphrase = subprocess .check_output ([utils_exe , self .device ['username' ]])
194- utils_password = get_data .E (passphrase , str ( self . device [ ' password' ]) )
197+ utils_password = get_data .E (passphrase , password )
195198 imc_login_str = "user=%s&password=%s" % (URL .quote_plus (self .device ['username' ]), URL .quote_plus (utils_password .rstrip ()))
196199 imc_login_uri = "https://%s/data/login" % self .device ['hostname' ]
197200 referer = "https://%s/uiconnector/index.html" % self .device ['hostname' ]
You can’t perform that action at this time.
0 commit comments