Skip to content

Commit

Permalink
fix: use six.text_type for unicode compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Styk <[email protected]>
  • Loading branch information
StykMartin committed Oct 28, 2024
1 parent b6b76c1 commit aea39af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion LabController/src/bkr/labcontroller/provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
from bkr.labcontroller import netboot
import utils

import six


logger = logging.getLogger(__name__)

class CommandQueuePoller(ProxyHelper):
Expand Down Expand Up @@ -175,7 +178,7 @@ def handle(self, command, predecessors):
except netboot.ImageFetchingError as e:
logger.exception('Error processing command %s', command['id'])
# It's not the system's fault so don't mark it as broken
self.mark_command_failed(command['id'], unicode(e), False)
self.mark_command_failed(command['id'], six.text_type(e), False)
except Exception as e:
logger.exception('Error processing command %s', command['id'])
self.mark_command_failed(command['id'],
Expand Down

0 comments on commit aea39af

Please sign in to comment.