Skip to content

Commit

Permalink
Raise a config.ConfigErrors if no serverUrl is provided to HttpStatus…
Browse files Browse the repository at this point in the history
…Push
  • Loading branch information
maruel committed Apr 20, 2012
1 parent 7a8b7bf commit 4dbfaa0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions master/buildbot/status/status_push.py
Expand Up @@ -31,6 +31,7 @@
except ImportError:
import json

from buildbot import config
from buildbot.status.base import StatusReceiverMultiService
from buildbot.status.persistent_queue import DiskQueue, IndexedQueue, \
MemoryQueue, PersistentQueue
Expand Down Expand Up @@ -338,6 +339,9 @@ def __init__(self, serverUrl, debug=None, maxMemoryItems=None,
@maxHttpRequestSize: limits the size of encoded data for AE, the default
is 1MB.
"""
if not serverUrl:
raise config.ConfigErrors(['HttpStatusPush requires a serverUrl'])

# Parameters.
self.serverUrl = serverUrl
self.extra_post_params = extra_post_params or {}
Expand Down

0 comments on commit 4dbfaa0

Please sign in to comment.