Skip to content

Commit

Permalink
bot: fix import logic in STOMP collector's module
Browse files Browse the repository at this point in the history
The logic regarding importing of the `stomp.py`'s stuff has been fixed:
now the condition of the absence of the `stomp` module (and thus, of the
entire library) would not be confused with the condition of the absence
of only the `stomp.exception` module (which would mean the presence of a
version of that library lacking just the `exception` submodule).
  • Loading branch information
zuo committed Oct 8, 2023
1 parent cbab7a0 commit a32e17f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion intelmq/bots/collectors/stomp/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

try:
import stomp
import stomp.exception
except ImportError:
stomp = None
else:
import stomp.exception

from intelmq.lib.bot import CollectorBot
from intelmq.lib.mixins import StompMixin
Expand Down

0 comments on commit a32e17f

Please sign in to comment.