BOM Project

Updated __unicode__ to __str__
This commit is contained in:
Ayub khan
2019-09-20 18:15:54 +05:00
parent 22992029f8
commit 5c47a3b425
62 changed files with 306 additions and 142 deletions

View File

@@ -15,6 +15,7 @@ import six
from celery.states import READY_STATES, RETRY, SUCCESS
from django.core.cache import cache
from django.db import DatabaseError, transaction
from django.utils.encoding import python_2_unicode_compatible
from six.moves import range, zip
from util.db import outer_atomic
@@ -121,6 +122,7 @@ def _generate_items_for_subtask(
TASK_LOG.info(u"Number of items generated by chunking %s not equal to original total %s", num_items_queued, total_num_items)
@python_2_unicode_compatible
class SubtaskStatus(object):
"""
Create and return a dict for tracking the status of a subtask.
@@ -205,7 +207,7 @@ class SubtaskStatus(object):
"""Return print representation of a SubtaskStatus object."""
return 'SubtaskStatus<%r>' % (self.to_dict(),)
def __unicode__(self):
def __str__(self):
"""Return unicode version of a SubtaskStatus object representation."""
return six.text_type(repr(self))