Skip to content
This repository was archived by the owner on Oct 9, 2021. It is now read-only.

Commit 0e92e09

Browse files
committed
only add cryptography to import path for py27 and newer
1 parent 7f5ce15 commit 0e92e09

84 files changed

Lines changed: 8 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

wakatime/compat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919

2020
is_py2 = (sys.version_info[0] == 2)
21+
is_py26 = (sys.version_info[0] == 2 and sys.version_info[1] == 6)
2122
is_py3 = (sys.version_info[0] == 3)
2223
is_win = platform.system() == 'Windows'
2324

wakatime/main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,22 @@
2121
sys.path.insert(0, os.path.dirname(pwd))
2222
sys.path.insert(0, os.path.join(pwd, 'packages'))
2323

24+
from .compat import py26
25+
26+
if not py26:
27+
sys.path.insert(0, os.path.join(pwd, 'packages', 'py27'))
28+
2429
from .__about__ import __version__
2530
from .api import send_heartbeats, get_time_today
2631
from .arguments import parse_arguments
2732
from .compat import u, json
2833
from .constants import SUCCESS, UNKNOWN_ERROR, HEARTBEATS_PER_REQUEST
2934
from .logger import setup_logging
3035

36+
3137
log = logging.getLogger('WakaTime')
3238

39+
3340
from .heartbeat import Heartbeat
3441
from .offlinequeue import Queue
3542

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

wakatime/packages/cryptography/hazmat/backends/__init__.py renamed to wakatime/packages/py27/cryptography/hazmat/backends/__init__.py

File renamed without changes.

0 commit comments

Comments
 (0)