mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 09:18:48 -03:30
Fixing ValueError becoming DataError
This commit is contained in:
@@ -9,6 +9,7 @@ from django.conf import settings
|
|||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.utils.timezone import now as tz_now
|
from django.utils.timezone import now as tz_now
|
||||||
from django.db import transaction, connection as django_connection
|
from django.db import transaction, connection as django_connection
|
||||||
|
from django.db.utils import DataError
|
||||||
from django_guid import set_guid
|
from django_guid import set_guid
|
||||||
|
|
||||||
import psutil
|
import psutil
|
||||||
@@ -191,7 +192,7 @@ class CallbackBrokerWorker(BaseWorker):
|
|||||||
e._retry_count = retry_count
|
e._retry_count = retry_count
|
||||||
|
|
||||||
# special sanitization logic for postgres treatment of NUL 0x00 char
|
# special sanitization logic for postgres treatment of NUL 0x00 char
|
||||||
if (retry_count == 1) and isinstance(exc_indv, ValueError) and ("\x00" in e.stdout):
|
if (retry_count == 1) and isinstance(exc_indv, DataError) and ("\x00" in e.stdout):
|
||||||
e.stdout = e.stdout.replace("\x00", "")
|
e.stdout = e.stdout.replace("\x00", "")
|
||||||
|
|
||||||
if retry_count >= self.INDIVIDUAL_EVENT_RETRIES:
|
if retry_count >= self.INDIVIDUAL_EVENT_RETRIES:
|
||||||
|
|||||||
Reference in New Issue
Block a user