Update fedmsg notification hook to use appropriate config.
Signed-off-by: Ralph Bean <rbean@redhat.com>
This commit is contained in:
parent
4b374278e4
commit
95761c69e1
@ -3,6 +3,7 @@
|
||||
|
||||
import argparse
|
||||
import fedmsg
|
||||
import fedmsg.config
|
||||
import json
|
||||
import sys
|
||||
|
||||
@ -14,7 +15,12 @@ def send(cmd, data):
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('cmd')
|
||||
|
||||
opts = parser.parse_args()
|
||||
|
||||
config = fedmsg.config.load_config()
|
||||
config['active'] = True # Connect out to a fedmsg-relay instance
|
||||
config['cert_prefix'] = 'releng' # Use this cert.
|
||||
fedmsg.init(**config)
|
||||
|
||||
data = json.load(sys.stdin)
|
||||
send(opts.cmd, data)
|
||||
|
Loading…
Reference in New Issue
Block a user