absPath
This commit is contained in:
		
							parent
							
								
									cc633829c0
								
							
						
					
					
						commit
						38cf348400
					
				@ -592,7 +592,6 @@ class Pyrrent2http(object):
 | 
				
			|||||||
    def buildTorrentParams(self, uri):
 | 
					    def buildTorrentParams(self, uri):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            absPath = uri2path(uri)
 | 
					            absPath = uri2path(uri)
 | 
				
			||||||
            logging.info('absPath: %s' % (repr(absPath)))
 | 
					 | 
				
			||||||
            logging.info(normalize_msg('Opening local torrent file: %s', (absPath,)))
 | 
					            logging.info(normalize_msg('Opening local torrent file: %s', (absPath,)))
 | 
				
			||||||
            torrent_info = lt.torrent_info(absPath)
 | 
					            torrent_info = lt.torrent_info(absPath)
 | 
				
			||||||
        except Exception as e:
 | 
					        except Exception as e:
 | 
				
			||||||
 | 
				
			|||||||
@ -45,7 +45,7 @@ def normalize_msg(tmpl, args):
 | 
				
			|||||||
    msg = isinstance(tmpl, unicode) and tmpl or tmpl.decode(chardet.detect(tmpl)['encoding'])
 | 
					    msg = isinstance(tmpl, unicode) and tmpl or tmpl.decode(chardet.detect(tmpl)['encoding'])
 | 
				
			||||||
    arg_ = []
 | 
					    arg_ = []
 | 
				
			||||||
    for a in args:
 | 
					    for a in args:
 | 
				
			||||||
        if not isinstance(a, unicode): arg_.append(a.decode(chardet.detect(a)['encoding']))
 | 
					        arg_.append(isinstance(a, unicode) and a or a.decode(chardet.detect(a)['encoding']))
 | 
				
			||||||
    return msg % tuple(arg_)
 | 
					    return msg % tuple(arg_)
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user