Fix python3 issues
This commit is contained in:
		
							parent
							
								
									d93f8ce937
								
							
						
					
					
						commit
						0d405cc8d4
					
				
					 4 changed files with 8 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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?'''
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue