From 0424017acbd34e14a33002e130c618c5dd6df222 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 11 Apr 2014 11:58:46 +0200 Subject: Replace range with xrange Merges vuolter/pyload@a50c8ff --- module/plugins/accounts/BayfilesCom.py | 2 +- module/plugins/accounts/FilecloudIo.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts') diff --git a/module/plugins/accounts/BayfilesCom.py b/module/plugins/accounts/BayfilesCom.py index 0a9e11ec8..d9330158a 100644 --- a/module/plugins/accounts/BayfilesCom.py +++ b/module/plugins/accounts/BayfilesCom.py @@ -32,7 +32,7 @@ class BayfilesCom(Account): __author_mail__ = "zoidberg@mujmail.cz" def loadAccountInfo(self, user, req): - for i in range(2): + for _ in xrange(2): response = json_loads(req.load("http://api.bayfiles.com/v1/account/info")) self.logDebug(response) if not response["error"]: diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py index 93ae02006..15e1d90be 100644 --- a/module/plugins/accounts/FilecloudIo.py +++ b/module/plugins/accounts/FilecloudIo.py @@ -31,7 +31,7 @@ class FilecloudIo(Account): def loadAccountInfo(self, user, req): # It looks like the first API request always fails, so we retry 5 times, it should work on the second try - for _ in range(5): + for _ in xrange(5): rep = req.load("https://secure.filecloud.io/api-fetch_apikey.api", post={"username": user, "password": self.accounts[user]['password']}) rep = json_loads(rep) -- cgit v1.2.3