Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Commit

Permalink
fix: bugfix (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored and repo-ranger[bot] committed Jul 23, 2019
1 parent 0b85d38 commit d6b61ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ecnunetwork/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import requests
import logging

logging.basicConfig(level=logging.DEBUG)


class ecnunetwork:
MESSAGE_OK = "Successfully connected to the Internet."
Expand All @@ -16,11 +18,11 @@ class ecnunetwork:
MESSAGE_SAVE = "Save password? [Y/n] "

def __init__(self, username=None, password=None, configfile=None):
self._initconfig(username, password)
self._readpassword()
self.configfile = configfile or os.path.join(
os.path.expanduser('~'), ".ecnunetwork")
self.url = "https://login.ecnu.edu.cn/include/auth_action.php"
self._initconfig(username, password)
self._readpassword()

def _initconfig(self, username=None, password=None):
self.config = {"username": username, "password": password}
Expand Down

0 comments on commit d6b61ba

Please sign in to comment.