zenoss / ZenPacks.zenoss.RabbitMQ

RabbitMQ Monitoring for Zenoss
GNU General Public License v2.0
10 stars 9 forks source link

Fix bug where exchange_string has more than 5 parts resulting in error #14

Closed th3penguinwhisperer closed 6 years ago

th3penguinwhisperer commented 10 years ago

In my case I had a variable exchange_string in exchanges_string that had this value:

"All Messages fanout true false []"

As this string gets split based on whitespace this results in 6 parts which then are assigned to only 5 variables which makes the code crash.

th3penguinwhisperer commented 10 years ago

Any idea if/when this will be included in the git repo?

keruzu commented 10 years ago

This should probably have an unit-test created for it. I'm wondering if the arguments has some extra bits in it from the split, in which case the split() function should just have a maxsplit flag set (ie 4), without the try/except block.

ie re.split(pattern, string, maxsplit=0, flags=0)

csmouse commented 6 years ago

PR has aged out. Closing.