mirror of
https://github.com/fergalmoran/dss.api.git
synced 2026-01-08 09:34:01 +00:00
Python 3 upgrade finished
This commit is contained in:
10
api/views.py
10
api/views.py
@@ -61,7 +61,7 @@ class CommentViewSet(viewsets.ModelViewSet):
|
||||
)
|
||||
except Mix.DoesNotExist:
|
||||
pass
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
pass
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ class AttachedImageUploadView(views.APIView):
|
||||
return Response(HTTP_202_ACCEPTED)
|
||||
except ObjectDoesNotExist:
|
||||
return Response(status=HTTP_404_NOT_FOUND)
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
logger.exception(ex)
|
||||
|
||||
return Response(status=HTTP_401_UNAUTHORIZED)
|
||||
@@ -196,7 +196,7 @@ class PartialMixUploadView(views.APIView):
|
||||
).delay()
|
||||
logger.debug("Waveform task started")
|
||||
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
logger.exception(ex)
|
||||
response = \
|
||||
'Unable to connect to rabbitmq, there may be a delay in getting your mix online'
|
||||
@@ -207,8 +207,8 @@ class PartialMixUploadView(views.APIView):
|
||||
'uid': uid
|
||||
}
|
||||
return Response(file_dict, HTTP_202_ACCEPTED)
|
||||
except Exception, ex:
|
||||
logger.exception(ex.message)
|
||||
except Exception as ex:
|
||||
logger.exception(ex)
|
||||
raise
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user