File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 88# flake8: noqa 
99
1010import  sys 
11- import  six 
1211
1312from  gitdb .utils .compat  import  (
1413    PY3 ,
@@ -34,6 +33,7 @@ def bchr(n):
3433        return  bytes ([n ])
3534    def  mviter (d ):
3635        return  d .values ()
36+     range  =  xrange 
3737    unicode  =  str 
3838else :
3939    FileType  =  file 
@@ -44,6 +44,7 @@ def mviter(d):
4444    byte_ord  =  ord 
4545    bchr  =  chr 
4646    unicode  =  unicode 
47+     range  =  xrange 
4748    def  mviter (d ):
4849        return  d .itervalues ()
4950
@@ -52,9 +53,9 @@ def mviter(d):
5253
5354def  safe_decode (s ):
5455    """Safely decodes a binary string to unicode""" 
55-     if  isinstance (s , six . text_type ):
56+     if  isinstance (s , unicode ):
5657        return  s 
57-     elif  isinstance (s , six . binary_type ):
58+     elif  isinstance (s , bytes ):
5859        if  PRE_PY27 :
5960            # Python 2.6 does not support the `errors` argument, so we cannot 
6061            # control the replacement of unsafe chars in it. 
Original file line number Diff line number Diff line change 5454    defenc ,
5555    PY3 ,
5656    safe_decode ,
57+     range ,
5758)
5859
5960import  os 
6061import  sys 
6162import  re 
62- from  six .moves  import  range 
6363
6464DefaultDBType  =  GitCmdObjectDB 
6565if  sys .version_info [:2 ] <  (2 , 5 ):     # python 2.4 compatiblity 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments