Skip to content

Commit

Permalink
Fix another error when debugging files on Linux and Python 2
Browse files Browse the repository at this point in the history
Fixes #2277
  • Loading branch information
ccordoba12 committed Mar 26, 2015
1 parent 716ead8 commit 43825ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spyderlib/widgets/externalshell/sitecustomize.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,10 @@ def notify_spyder(self, frame):
return
fname = self.canonic(frame.f_code.co_filename)
if sys.version[0] == '2':
fname = unicode(fname, "utf-8")
try:
filename = unicode(filename, "utf-8")

This comment has been minimized.

Copy link
@awisse

awisse May 28, 2015

This should be fname, not filename.

This comment has been minimized.

Copy link
@ccordoba12

ccordoba12 May 28, 2015

Author Member

You're right, sorry for that. It's fixed in master though :-)

This comment has been minimized.

Copy link
@ccordoba12

ccordoba12 Jun 1, 2015

Author Member

This error will be fixed too in 2.3.5. Thanks for reporting it :-)

except TypeError:
pass
lineno = frame.f_lineno
if isinstance(fname, basestring) and isinstance(lineno, int):
if osp.isfile(fname) and monitor is not None:
Expand Down

0 comments on commit 43825ba

Please sign in to comment.