Skip to content

Commit fede02c

Browse files
author
Geoffrey Lehée
committed
Merge pull request #84 from socketubs/ssl
SSL FUCK YEAH
2 parents 4641dad + 3fb6e4a commit fede02c

File tree

15 files changed

+50
-14
lines changed

15 files changed

+50
-14
lines changed

.no-sublime-package

Whitespace-only changes.

Sublimall.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,45 @@
11
# -*- coding: utf-8 -*-
2+
import os
23
import sys
4+
import imp
35
import sublime
46
from imp import reload
57

6-
if sys.version_info.major == 2:
8+
st_version = 2
9+
if int(sublime.version()) > 3000:
10+
st_version = 3
11+
12+
if st_version == 2:
713
msg = "Sublimall is only available for SublimeText 3.\n Sorry about that."
814
sublime.error_message(msg)
915

16+
if sublime.platform() == 'linux':
17+
so_name = '_ssl.cpython-33m.so'
18+
arch_lib_path = os.path.join(
19+
os.path.dirname(__file__),
20+
'lib',
21+
'st%d_linux_%s' % (st_version, sublime.arch()))
22+
23+
print('[Sublimall] enabling custom linux ssl module')
24+
for ssl_ver in ['1.0.0', '10', '0.9.8']:
25+
lib_path = os.path.join(arch_lib_path, 'libssl-' + ssl_ver)
26+
sys.path.append(lib_path)
27+
try:
28+
import _ssl
29+
print(
30+
'[Sublimall] successfully loaded _ssl '
31+
'module for libssl.so.%s' % ssl_ver)
32+
import http.client
33+
imp.reload(http.client)
34+
break
35+
except (ImportError) as e:
36+
print('[Sublimall] _ssl module import error - ' + str(e))
37+
if '_ssl' in sys.modules:
38+
try:
39+
import ssl
40+
except (ImportError) as e:
41+
print('[Sublimall] ssl module import error - ' + str(e))
42+
1043
reloader_name = 'Sublimall.sublimall.reloader'
1144
if reloader_name in sys.modules:
1245
reload(sys.modules[reloader_name])
140 KB
Binary file not shown.
157 KB
Binary file not shown.
173 KB
Binary file not shown.
172 KB
Binary file not shown.
221 KB
Binary file not shown.
215 KB
Binary file not shown.

sublimall/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
__version_info__ = (0, 0, 23)
2+
__version_info__ = (0, 0, 24)
33
__version__ = '.'.join(str(x) for x in __version_info__)
44

55
SETTINGS_USER_FILE = "Sublimall.sublime-settings"

sublimall/commands/command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CommandWithStatus(object):
2626
"""
2727
def __init__(self, *args, **kwargs):
2828
self._messageStatus = MessageStatus()
29-
sublime.set_timeout(lambda: self.unset_message, 1000)
29+
sublime.set_timeout(lambda: self.unset_message, 3000)
3030
super().__init__(*args, **kwargs)
3131

3232
def set_timed_message(self, message, time=7, clear=False):

0 commit comments

Comments
 (0)