Skip to content

Commit f1d40f6

Browse files
committed
Fixed some unicode issues on ST2 with the WinINet downloader
1 parent 26b13dc commit f1d40f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

package_control/downloaders/wininet_downloader.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -510,15 +510,15 @@ def download(self, url, error_message, timeout, tries, prefer_cached=False):
510510
except (NonHttpError, HttpError) as e:
511511

512512
# GitHub and BitBucket seem to time out a lot
513-
if str(e).find('timed out') != -1:
513+
if unicode_from_os(e).find('timed out') != -1:
514514
error_string = u'Downloading %s timed out' % url
515515
if tries:
516516
error_string += ', trying again'
517517
if self.debug:
518518
console_write(error_string, True)
519519
continue
520520

521-
error_string = u'%s %s downloading %s.' % (error_message, e, url)
521+
error_string = u'%s %s downloading %s.' % (error_message, unicode_from_os(e), url)
522522

523523
finally:
524524
if http_connection:

0 commit comments

Comments
 (0)