Skip to content

Commit ff1561d

Browse files
committed
Fix comment, bad and pointless exception handling
Fix copyright year. Fix doc for new commands. Fix bad exception handling. Remove pointless warning message.
1 parent 91f9b34 commit ff1561d

File tree

7 files changed

+11
-18
lines changed

7 files changed

+11
-18
lines changed

bin/cylc-checkpoint

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

33
# THIS FILE IS PART OF THE CYLC SUITE ENGINE.
4-
# Copyright (C) 2008-2016 NIWA
4+
# Copyright (C) 2008-2018 NIWA
55
#
66
# This program is free software: you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by

bin/cylc-client

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

33
# THIS FILE IS PART OF THE CYLC SUITE ENGINE.
4-
# Copyright (C) 2008-2016 NIWA
4+
# Copyright (C) 2008-2018 NIWA
55
#
66
# This program is free software: you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by
@@ -31,7 +31,6 @@ if '--use-ssh' in sys.argv[1:]:
3131
if remrun():
3232
sys.exit(0)
3333

34-
import cylc.flags
3534
from cylc.option_parsers import CylcOptionParser as COP
3635
from cylc.network.httpclient import SuiteRuntimeServiceClient
3736

bin/cylc-message

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Task jobs use this command to record and report status such as success and
2828
failure. Applications run by task jobs can use this command to report messages
2929
and to report registered task outputs.
3030
31-
Messages can be specified as arguments. A '-' indicates that messages the
32-
command should read messages from STDIN. When reading from STDIN, multiple
33-
messages are separated by empty lines.
31+
Messages can be specified as arguments. A '-' indicates that the command should
32+
read messages from STDIN. When reading from STDIN, multiple messages are
33+
separated by empty lines.
3434
3535
Each message can be prefixed with a severity level using the syntax 'SEVERITY:
3636
MESSAGE'.

bin/cylc-spawn

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

33
# THIS FILE IS PART OF THE CYLC SUITE ENGINE.
4-
# Copyright (C) 2008-2015 NIWA
4+
# Copyright (C) 2008-2018 NIWA
55
#
66
# This program is free software: you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by

lib/cylc/network/httpclient.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -285,21 +285,15 @@ def put_messages(self, payload):
285285
func_name, task_id='%s.%s' % (name, cycle),
286286
priority=severity, message=message))
287287
except ClientInfoError:
288+
# Contact info file not found, suite probably not running.
289+
# Don't bother with retry, suite restart will poll any way.
288290
raise
289291
except ClientError as exc:
290292
now = get_current_time_string()
291293
sys.stderr.write(
292294
"%s WARNING - Message send failed, try %s of %s: %s\n" % (
293295
now, i, max_tries, exc))
294-
# Break if:
295-
# * Exhausted number of tries.
296-
# * Contact info file not found, suite probably not running.
297-
# Don't bother with retry, suite restart will poll any way.
298-
if i >= max_tries or isinstance(exc, ClientInfoError):
299-
# Issue a warning and let the task carry on
300-
sys.stderr.write(
301-
"%s WARNING - MESSAGE SEND FAILED\n" % (now))
302-
else:
296+
if i < max_tries:
303297
sys.stderr.write(
304298
" retry in %s seconds, timeout is %s\n" % (
305299
retry_intvl, self.timeout))

tests/cylc-insert/10-insert-non-graphed-cycle-point.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# THIS FILE IS PART OF THE CYLC SUITE ENGINE.
3-
# Copyright (C) 2008-2016 NIWA
3+
# Copyright (C) 2008-2018 NIWA
44
#
55
# This program is free software: you can redistribute it and/or modify
66
# it under the terms of the GNU General Public License as published by

tests/task-proc-loop/00-count.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# THIS FILE IS PART OF THE CYLC SUITE ENGINE.
3-
# Copyright (C) 2008-2015 NIWA
3+
# Copyright (C) 2008-2018 NIWA
44
#
55
# This program is free software: you can redistribute it and/or modify
66
# it under the terms of the GNU General Public License as published by

0 commit comments

Comments
 (0)