scrapy_splash/utils.py
changed.
Showing 1 of 1 files from the diff.
@@ -6,7 +6,12 @@
Loading
6 | 6 | ||
7 | 7 | from scrapy.http import Headers |
|
8 | 8 | try: |
|
9 | - | from scrapy.utils.python import to_bytes, to_unicode |
|
9 | + | import scrapy |
|
10 | + | if scrapy.version_info >= (2, ): |
|
11 | + | from scrapy.utils.python import to_unicode |
|
12 | + | else: |
|
13 | + | from scrapy.utils.python import to_native_str as to_unicode |
|
14 | + | from scrapy.utils.python import to_bytes |
|
10 | 15 | except ImportError: |
|
11 | 16 | # scrapy < 1.1 |
|
12 | 17 | from scrapy.utils.python import unicode_to_str as to_bytes |
Files | Coverage |
---|---|
scrapy_splash | 91.99% |
Project Totals (9 files) | 91.99% |
213.1
TRAVIS_PYTHON_VERSION=2.7 TRAVIS_OS_NAME=linux TOXENV=py27
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.