Skip to content

Commit fa96fd3

Browse files
committed
Make missing config section error message clearer
1 parent bf78531 commit fa96fd3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

jenkins_cli/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ def read_settings_from_file(cls, environment):
134134
try:
135135
return dict(config.items(environment))
136136
except NoSectionError:
137-
raise CliException('No such environment: %s' % environment)
137+
raise CliException('%s section not found in .jenkins-cli config'
138+
' file' % environment)
138139

139140
def run_command(self, args):
140141
command = args.jenkins_command

0 commit comments

Comments
 (0)