File tree Expand file tree Collapse file tree 2 files changed +7
-14
lines changed Expand file tree Collapse file tree 2 files changed +7
-14
lines changed Original file line number Diff line number Diff line change 7
7
from .configuration import Configuration
8
8
import io
9
9
import codecs
10
- try :
11
- # Python 2.x and 3.x support for checking string types
12
- basestring
13
- unicode
14
- except NameError :
15
- basestring = str
16
- unicode = str
10
+
11
+ # Python 2.x and 3.x support for checking string types
12
+ basestring = str .__mro__ [- 2 ]
13
+ unicode = type (u'' )
17
14
18
15
19
16
class PDFKit (object ):
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
import os
3
3
import io
4
- try :
5
- # Python 2.x and 3.x support for checking string types
6
- assert basestring
7
- assert unicode
8
- except NameError :
9
- basestring = str
10
- unicode = str
11
4
5
+ # Python 2.x and 3.x support for checking string types
6
+ basestring = str .__mro__ [- 2 ]
7
+ unicode = type (u'' )
12
8
13
9
14
10
class Source (object ):
You can’t perform that action at this time.
0 commit comments