dj111
eric 2020-02-12 15:31:14 -05:00
parent 706a21abe6
commit 112d35af71
3 changed files with 6 additions and 6 deletions

View File

@ -40,7 +40,7 @@ def question_timeperiod(request, question):
@answer_proc('timeperiod')
def process_timeperiod(question, answer):
if not answer['ANSWER'] or not 'unit in 'answer:
if not answer['ANSWER'] or not 'unit' in answer:
raise AnswerException(_(u"Invalid time period"))
period = answer['ANSWER'].strip()
if period:

View File

@ -1,6 +1,6 @@
#!/usr/bin/python
import codecs
import cStringIO
from six import StringIO
import csv
from six import text_type as unicodestr
@ -71,7 +71,7 @@ class UnicodeWriter:
def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds):
# Redirect output to a queue
self.queue = cStringIO.StringIO()
self.queue = StringIO()
self.writer = csv.writer(self.queue, dialect=dialect, **kwds)
self.stream = f
self.encoder = codecs.getincrementalencoder(encoding)()

View File

@ -29,11 +29,11 @@ setup(
],
zip_safe=False,
install_requires=[
'django',
'django-transmeta',
'django<2',
'django-transmeta-eh',
'django-compat',
'pyyaml',
'pyparsing'
'pyparsing',
'six'
],
setup_requires=[