flake8: comply with new E722 rule

This commit is contained in:
AlanCoding
2017-10-23 13:57:12 -04:00
committed by Ryan Petrello
parent 7538b4ce15
commit 67867cf0c8
17 changed files with 30 additions and 30 deletions

View File

@@ -3816,7 +3816,7 @@ class ActivityStreamSerializer(BaseSerializer):
def get_object_association(self, obj):
try:
return obj.object_relationship_type.split(".")[-1].split("_")[1]
except:
except Exception:
pass
return ""

View File

@@ -362,7 +362,7 @@ class ApiV1ConfigView(APIView):
try:
settings.LICENSE = {}
return Response(status=status.HTTP_204_NO_CONTENT)
except:
except Exception:
# FIX: Log
return Response({"error": _("Failed to remove license (%s)") % has_error}, status=status.HTTP_400_BAD_REQUEST)
@@ -3275,7 +3275,7 @@ class WorkflowJobTemplateNodeDetail(WorkflowsEnforcementMixin, RetrieveUpdateDes
try:
obj = self.get_object()
data.update(obj.char_prompts)
except:
except Exception:
pass
return super(WorkflowJobTemplateNodeDetail, self).update_raw_data(data)