File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -562,7 +562,7 @@ def process_control_event(self, e):
562
562
self .startup ()
563
563
except IOError as e :
564
564
self .status_bar .message (
565
- _ ('Executing PYTHONSTARTUP failed: %s' ) % (str ( e ) ))
565
+ _ ('Executing PYTHONSTARTUP failed: %s' ) % (e , ))
566
566
567
567
elif isinstance (e , bpythonevents .UndoEvent ):
568
568
self .undo (n = e .n )
@@ -1532,7 +1532,7 @@ def show_source(self):
1532
1532
try :
1533
1533
source = self .get_source_of_current_name ()
1534
1534
except SourceNotFound as e :
1535
- self .status_bar .message (str ( e ))
1535
+ self .status_bar .message ('%s' % ( e , ))
1536
1536
else :
1537
1537
if self .config .highlight_show_source :
1538
1538
source = format (PythonLexer ().get_tokens (source ),
Original file line number Diff line number Diff line change @@ -545,11 +545,11 @@ def get_source_of_current_name(self):
545
545
obj = self .get_object (line )
546
546
return inspection .get_source_unicode (obj )
547
547
except (AttributeError , NameError ) as e :
548
- msg = _ ("Cannot get source: %s" ) % (str ( e ) , )
548
+ msg = _ (u "Cannot get source: %s" ) % (e , )
549
549
except IOError as e :
550
- msg = str ( e )
550
+ msg = u"%s" % ( e , )
551
551
except TypeError as e :
552
- if "built-in" in str ( e ):
552
+ if "built-in" in u"%s" % ( e , ):
553
553
msg = _ ("Cannot access source of %r" ) % (obj , )
554
554
else :
555
555
msg = _ ("No source code found for %s" ) % (self .current_line , )
You can’t perform that action at this time.
0 commit comments