code: remove last usage of py.error
`str(self.path)` can't raise at all, so it can just be removed.
This commit is contained in:
		
							parent
							
								
									b3db440d4c
								
							
						
					
					
						commit
						2ee90887b7
					
				| 
						 | 
					@ -268,10 +268,6 @@ class TracebackEntry:
 | 
				
			||||||
        return tbh
 | 
					        return tbh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __str__(self) -> str:
 | 
					    def __str__(self) -> str:
 | 
				
			||||||
        try:
 | 
					 | 
				
			||||||
            fn = str(self.path)
 | 
					 | 
				
			||||||
        except py.error.Error:
 | 
					 | 
				
			||||||
            fn = "???"
 | 
					 | 
				
			||||||
        name = self.frame.code.name
 | 
					        name = self.frame.code.name
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            line = str(self.statement).lstrip()
 | 
					            line = str(self.statement).lstrip()
 | 
				
			||||||
| 
						 | 
					@ -279,7 +275,7 @@ class TracebackEntry:
 | 
				
			||||||
            raise
 | 
					            raise
 | 
				
			||||||
        except BaseException:
 | 
					        except BaseException:
 | 
				
			||||||
            line = "???"
 | 
					            line = "???"
 | 
				
			||||||
        return "  File %r:%d in %s\n  %s\n" % (fn, self.lineno + 1, name, line)
 | 
					        return "  File %r:%d in %s\n  %s\n" % (self.path, self.lineno + 1, name, line)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @property
 | 
					    @property
 | 
				
			||||||
    def name(self) -> str:
 | 
					    def name(self) -> str:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue