Skip to content

Commit

Permalink
narrow exception
Browse files Browse the repository at this point in the history
  • Loading branch information
kashifkhan committed Nov 7, 2023
1 parent 58bc67b commit 2fd9880
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ def encode_filter_set(value):
VALUE: ({TYPE: AMQPTypes.symbol, VALUE: descriptor}, filter_value),
}
# if its not a type that is known, raise the error from the server
except Exception:
except (ValueError, TypeError):
described_filter = data

cast(List, fields[VALUE]).append(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ def encode_filter_set(value):
VALUE: ({TYPE: AMQPTypes.symbol, VALUE: descriptor}, filter_value),
}
# if its not a type that is known, raise the error from the server
except Exception:
except (ValueError, TypeError):
described_filter = data

cast(List, fields[VALUE]).append(
Expand Down

0 comments on commit 2fd9880

Please sign in to comment.