Skip to content
Browse files

@olasd is expecting this to exit with an error code.

  • Loading branch information...
1 parent 5589ad1 commit 07ade1295bc4072dfe1d8715c978f7fbbb8cc15b @ralphbean ralphbean committed Feb 28, 2014
Showing with 7 additions and 1 deletion.
  1. +4 −0 fedmsg/commands/config.py
  2. +3 −1 fedmsg/tests/test_commands.py
View
4 fedmsg/commands/config.py
@@ -92,6 +92,10 @@ def config():
if args.query:
cur = fedmsg.utils.dict_query(cur, args.query)
+ if cur[args.query] is None:
+ print >>sys.stderr, (
+ "Key `%s` does not exist in config" % args.query)
+ sys.exit(1)
if isinstance(cur, list):
for i in cur:
View
4 fedmsg/tests/test_commands.py
@@ -230,7 +230,9 @@ def test_config_query_broken(self, stderr, stdout, argv):
except SystemExit as exc:
eq_(exc.code, 1)
else:
- assert False
+ output = "output: %r, error: %r" % (
+ stdout.getvalue(), stderr.getvalue())
+ assert False, output
output = stdout.getvalue()
error = stderr.getvalue()

0 comments on commit 07ade12

Please sign in to comment.
Something went wrong with that request. Please try again.