only use unicodecsv for python 2.x

Only use unicodecsv for python 2, since the python 3 module works fine
with unicode data.

Change-Id: I8b82248e855a6986b7541ca997d8fd56628b17a5
Related-bug: #1491888
This commit is contained in:
Doug Hellmann 2015-09-23 19:47:07 +00:00
parent a2e52e2dac
commit 25cce67529
2 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,11 @@
"""Output formatters using csv format.
"""
import unicodecsv as csv
import sys
if sys.version_info[0] == 3:
import csv
else:
import unicodecsv as csv
import os
from .base import ListFormatter

View File

@ -8,5 +8,5 @@ PrettyTable<0.8,>=0.7
pyparsing>=2.0.1
six>=1.9.0
stevedore>=1.5.0 # Apache-2.0
unicodecsv>=0.8.0
unicodecsv>=0.8.0;python_version=='2.7' or python_version=='2.6'
PyYAML>=3.1.0