Skip to content

Commit

Permalink
Merge pull request #412 from fedora-infra/feature/attribute-access
Browse files Browse the repository at this point in the history
Be more careful with attribute access here.
  • Loading branch information
ralphbean committed Jun 2, 2017
2 parents 8f54861 + 7a5c6c7 commit 0757e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fedmsg/core.py
Expand Up @@ -332,7 +332,7 @@ def publish(self, topic=None, msg=None, modname=None,
# Perhaps we're using STOMP or AMQP? Let moksha handle it.
import moksha.hub
# First, a quick sanity check.
if not moksha.hub._hub:
if not getattr(moksha.hub, '_hub', None):
raise AttributeError("Unable to publish non-zeromq msg"
"without moksha-hub initialization.")
# Let moksha.hub do our work.
Expand Down

0 comments on commit 0757e96

Please sign in to comment.