/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos-monitor

  • Committer: Teddy Hogeborn
  • Date: 2012-05-05 09:33:27 UTC
  • Revision ID: teddy@recompile.se-20120505093327-kzn0kkia6rhpciwd
* mandos-ctl: Break long lines.
* mandos-monitor: - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#     GNU General Public License for more details.
18
18
19
19
# You should have received a copy of the GNU General Public License
20
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
# along with this program.  If not, see
 
21
# <http://www.gnu.org/licenses/>.
21
22
22
23
# Contact the authors at <mandos@recompile.se>.
23
24
304
305
                message = "Denial in {0}. (a)pprove?"
305
306
            message = message.format(unicode(timer).rsplit(".", 1)[0])
306
307
        elif self.properties["LastCheckerStatus"] != 0:
307
 
            # When checker has failed, print a timer until client expires
 
308
            # When checker has failed, show timer until client expires
308
309
            expires = self.properties["Expires"]
309
310
            if expires == "":
310
311
                timer = datetime.timedelta(0)
311
312
            else:
312
 
                expires = datetime.datetime.strptime(expires,
313
 
                                                     '%Y-%m-%dT%H:%M:%S.%f')
 
313
                expires = (datetime.datetime.strptime
 
314
                           (expires, '%Y-%m-%dT%H:%M:%S.%f'))
314
315
                timer = expires - datetime.datetime.utcnow()
315
316
            message = ('A checker has failed! Time until client'
316
317
                       ' gets disabled: {0}'