Skip to content

Commit ed33bec

Browse files
committed
Fix python2 Cookie import
1 parent a96223c commit ed33bec

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

vk_api/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
except ImportError:
1313
import json
1414

15-
from http.cookiejar import Cookie
15+
try:
16+
from http.cookiejar import Cookie
17+
except ImportError: # python2
18+
from cookielib import Cookie
1619

1720

1821
def search_re(reg, string):

0 commit comments

Comments
 (0)