Python - 使用特定代码捕获错误

Python - Catch error with specific code

在代码中我有这个错误

raise ClientError(response_data['data']['error'], response.status_code)
ClientError: (300) corrupt or not supported.

如何捕获错误 300?

try:
    somestuff

except ClientError:
    if error = 300:  # ?????
        print 'catched'
    else:
        just end the program

感谢您的帮助。

import errno

try:
  ..
except ClientError as serr:
    if serr.errno == 300:      
        raise serr