Fixed %s formatting
This commit is contained in:
parent
6fa52c6337
commit
285a114a64
1 changed files with 9 additions and 8 deletions
|
@ -72,10 +72,11 @@ class PyiCloudSession(Session):
|
||||||
request_logger.addFilter(self.service.password_filter)
|
request_logger.addFilter(self.service.password_filter)
|
||||||
|
|
||||||
request_logger.debug(
|
request_logger.debug(
|
||||||
"%s %s %s",
|
"%s %s %s" % (
|
||||||
method,
|
method,
|
||||||
url,
|
url,
|
||||||
kwargs.get("data", ""),
|
kwargs.get("data", "")
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
has_retried = kwargs.get("retried")
|
has_retried = kwargs.get("retried")
|
||||||
|
@ -208,7 +209,7 @@ class PyiCloudService(object):
|
||||||
self._session_directory = session_directory
|
self._session_directory = session_directory
|
||||||
else:
|
else:
|
||||||
self._session_directory = path.join(gettempdir(), "pyicloud-session")
|
self._session_directory = path.join(gettempdir(), "pyicloud-session")
|
||||||
LOGGER.debug("Using session file %s", self.session_path)
|
LOGGER.debug("Using session file %s" % self.session_path)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(self.session_path) as session_f:
|
with open(self.session_path) as session_f:
|
||||||
|
@ -246,12 +247,12 @@ class PyiCloudService(object):
|
||||||
if path.exists(cookiejar_path):
|
if path.exists(cookiejar_path):
|
||||||
try:
|
try:
|
||||||
self.session.cookies.load(ignore_discard=True, ignore_expires=True)
|
self.session.cookies.load(ignore_discard=True, ignore_expires=True)
|
||||||
LOGGER.debug("Read cookies from %s", cookiejar_path)
|
LOGGER.debug("Read cookies from %s" % cookiejar_path)
|
||||||
except: # pylint: disable=bare-except
|
except: # pylint: disable=bare-except
|
||||||
# Most likely a pickled cookiejar from earlier versions.
|
# Most likely a pickled cookiejar from earlier versions.
|
||||||
# The cookiejar will get replaced with a valid one after
|
# The cookiejar will get replaced with a valid one after
|
||||||
# successful authentication.
|
# successful authentication.
|
||||||
LOGGER.warning("Failed to read cookiejar %s", cookiejar_path)
|
LOGGER.warning("Failed to read cookiejar %s" % cookiejar_path)
|
||||||
|
|
||||||
self.authenticate()
|
self.authenticate()
|
||||||
|
|
||||||
|
@ -277,7 +278,7 @@ class PyiCloudService(object):
|
||||||
LOGGER.debug("Invalid authentication token, will log in from scratch.")
|
LOGGER.debug("Invalid authentication token, will log in from scratch.")
|
||||||
|
|
||||||
if not login_successful:
|
if not login_successful:
|
||||||
LOGGER.debug("Authenticating as %s", self.user["accountName"])
|
LOGGER.debug("Authenticating as %s" % self.user["accountName"])
|
||||||
|
|
||||||
data = dict(self.user)
|
data = dict(self.user)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue