Merge pull request #630 from AlanCoding/text_type

Fix unicode bugs with log statements
This commit is contained in:
Alan Rominger
2018-02-15 15:52:29 -05:00
committed by GitHub

View File

@@ -17,6 +17,7 @@ import stat
import tempfile import tempfile
import time import time
import traceback import traceback
import six
import urlparse import urlparse
import uuid import uuid
from distutils.version import LooseVersion as Version from distutils.version import LooseVersion as Version
@@ -1543,15 +1544,15 @@ class RunProjectUpdate(BaseTask):
if not inv_src.update_on_project_update: if not inv_src.update_on_project_update:
continue continue
if inv_src.scm_last_revision == scm_revision: if inv_src.scm_last_revision == scm_revision:
logger.debug('Skipping SCM inventory update for `{}` because ' logger.debug(six.text_type('Skipping SCM inventory update for `{}` because '
'project has not changed.'.format(inv_src.name)) 'project has not changed.').format(inv_src.name))
continue continue
logger.debug('Local dependent inventory update for `{}`.'.format(inv_src.name)) logger.debug(six.text_type('Local dependent inventory update for `{}`.').format(inv_src.name))
with transaction.atomic(): with transaction.atomic():
if InventoryUpdate.objects.filter(inventory_source=inv_src, if InventoryUpdate.objects.filter(inventory_source=inv_src,
status__in=ACTIVE_STATES).exists(): status__in=ACTIVE_STATES).exists():
logger.info('Skipping SCM inventory update for `{}` because ' logger.info(six.text_type('Skipping SCM inventory update for `{}` because '
'another update is already active.'.format(inv_src.name)) 'another update is already active.').format(inv_src.name))
continue continue
local_inv_update = inv_src.create_inventory_update( local_inv_update = inv_src.create_inventory_update(
launch_type='scm', launch_type='scm',