diff --git a/appy/pod/buffers.py b/appy/pod/buffers.py index 3bff041..96ceab7 100644 --- a/appy/pod/buffers.py +++ b/appy/pod/buffers.py @@ -704,7 +704,7 @@ class MemoryBuffer(Buffer): res, escape = evalEntry.evaluate(context) if escape: result.dumpContent(res) else: result.write(res) - except EvaluationError, e: + except EvaluationError as e: # This exception has already been treated (see the # "except" block below). Simply re-raise it when needed. if self.env.raiseOnError: raise e diff --git a/appy/shared/dav.py b/appy/shared/dav.py index 41c043a..295fc02 100644 --- a/appy/shared/dav.py +++ b/appy/shared/dav.py @@ -1,7 +1,7 @@ # ------------------------------------------------------------------------------ import os, re, http.client, sys, stat, urllib.parse, time, socket, xml.sax from urllib.parse import quote -from StringIO import StringIO +from io import StringIO from mimetypes import guess_type from base64 import encodestring from appy import Object diff --git a/appy/shared/rtf.py b/appy/shared/rtf.py index be9ddf6..97967e5 100644 --- a/appy/shared/rtf.py +++ b/appy/shared/rtf.py @@ -25,7 +25,8 @@ be strictly greater than 1.''' # ----------------------------------------------------------------------------- -import re, sys, collections, UserDict +import re, sys, collections +from collections import UserDict from io import StringIO # ----------------------------------------------------------------------------- @@ -203,9 +204,9 @@ class Table(collections.UserList): return infoDict # ----------------------------------------------------------------------------- -class TableRow(UserDict.UserDict): +class TableRow(UserDict): def __init__(self, table): - UserDict.UserDict.__init__(self) + UserDict.__init__(self) self.table = table def __getitem__(self, key): '''This method "implements" row inheritance: if the current row does @@ -214,7 +215,7 @@ class TableRow(UserDict.UserDict): keyError = False t = self.table if key in self: - res = UserDict.UserDict.__getitem__(self, key) + res = UserDict.__getitem__(self, key) else: # Get the parent row if t.parent: diff --git a/appy/shared/utils.py b/appy/shared/utils.py index daef14a..6a9cbf5 100644 --- a/appy/shared/utils.py +++ b/appy/shared/utils.py @@ -542,7 +542,7 @@ class LinesCounter: if analyser.numberOfFiles: analyser.printReport() total += analyser.numberOfLines() - print 'Total (including commented and blank): ***', total, '***' + print('Total (including commented and blank): ***', total, '***') def isExcluded(self, path): '''Must p_path be excluded from the analysis?'''