Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for non-default Username #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dlipower/dlipower.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def login(self):

m = hashlib.md5() # nosec - The switch we are talking to uses md5 hashes
m.update(form_response.encode())
data = {'Username': 'admin', 'Password': m.hexdigest()}
data = {'Username': self.userid, 'Password': m.hexdigest()}
headers = {'Content-Type': 'application/x-www-form-urlencoded'}

try:
Expand Down Expand Up @@ -510,7 +510,7 @@ def statuslist(self):
except IndexError:
# Finding the root of the table with the outlet info failed
# try again assuming we're seeing the table for a user
# account insteaed of the admin account (tables are different)
# account instead of the admin account (tables are different)
try:
self._is_admin = False
root = soup.findAll('th', text='#')[0].parent.parent.parent
Expand Down