Use the print function everywhere

python modernize.py --no-six -f libmodernize.fixes.fix_print -w

With manual fixes as the import was put always on top.
This commit is contained in:
Laurent Bachelier 2014-10-06 14:23:20 +02:00
commit 74a4ef6723
73 changed files with 499 additions and 442 deletions

View file

@ -17,6 +17,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
from optparse import OptionGroup
@ -48,12 +49,12 @@ class WeboobDebug(Application):
try:
backend_name = argv[1]
except IndexError:
print >>self.stderr, 'Usage: %s BACKEND' % argv[0]
print('Usage: %s BACKEND' % argv[0], file=self.stderr)
return 1
try:
backend = self.weboob.load_backends(names=[backend_name])[backend_name]
except KeyError:
print >>self.stderr, u'Unable to load backend "%s"' % backend_name
print(u'Unable to load backend "%s"' % backend_name, file=self.stderr)
return 1
locs = dict(backend=backend, browser=backend.browser, application=self, weboob=self.weboob)