Puppet: System Administration Automated

Support

Ticket #602 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

uncaught exception if crontab with empty lines exists before creating first cron

Reported by: lluis Assigned to: luke
Priority: normal Milestone: elmo
Component: library Version: 0.22.3
Severity: normal Keywords: cron crontab
Cc: Triage Stage: Accepted
Attached Patches: None Complexity: Unknown

Description

The first time you add a cron definition, if root's crontab has some blank lines, puppet throws an exception:

err: Got an uncaught exception of type Argument Error?: Field 'command' is required

and doesn't adds the cron.

I think it can be solved changing the regular expression at line 23 of puppet/provider/cron/crontab.rb from:

text_line :blank, :match => %r{^\s+}

to:

text_line :blank, :match => %r{^\s*$}

Change History

04/19/07 21:34:30 changed by luke

  • status changed from new to assigned.
  • stage changed from Unreviewed to Accepted.
  • milestone set to elmo.

04/30/07 21:29:26 changed by luke

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in [2440]