@@ -34,7 +34,7 @@ def path=(user)
3434 begin
3535 @uid = Puppet ::Util . uid ( user )
3636 rescue Puppet ::Error => detail
37- raise FileReadError , _ ( 'Could not retrieve user %{user}: %{detail}' ) % { user : user , detail : detail } , detail . backtrace
37+ raise FileReadError , _ ( 'Could not retrieve user %{user}: %{detail}' ) % ( { user :, detail : } ) , detail . backtrace
3838 end
3939
4040 # XXX We have to have the user name, not the uid, because some
@@ -60,7 +60,7 @@ def read
6060
6161 ''
6262 else
63- raise FileReadError , _ ( 'Could not read crontab for %{path}: %{detail}' ) % { path : @path , detail : detail } , detail . backtrace
63+ raise FileReadError , _ ( 'Could not read crontab for %{path}: %{detail}' ) % ( { path : @path , detail : } ) , detail . backtrace
6464 end
6565 end
6666
@@ -123,15 +123,15 @@ def read
123123
124124 ''
125125 else
126- raise FileReadError , _ ( 'Could not read crontab for %{path}: %{detail}' ) % { path : @path , detail : detail } , detail . backtrace
126+ raise FileReadError , _ ( 'Could not read crontab for %{path}: %{detail}' ) % ( { path : @path , detail : } ) , detail . backtrace
127127 end
128128 end
129129
130130 # Remove a specific @path's cron tab.
131131 def remove
132132 Puppet ::Util ::Execution . execute ( [ 'crontab' , '-r' ] , cronargs ) . to_s
133133 rescue => detail
134- raise FileReadError , _ ( 'Could not remove crontab for %{path}: %{detail}' ) % { path : @path , detail : detail } , detail . backtrace
134+ raise FileReadError , _ ( 'Could not remove crontab for %{path}: %{detail}' ) % ( { path : @path , detail : } ) , detail . backtrace
135135 end
136136
137137 # Overwrite a specific @path's cron tab; must be passed the @path name
@@ -146,7 +146,7 @@ def write(text)
146146 File . chown ( Puppet ::Util . uid ( @path ) , nil , output_file . path )
147147 Puppet ::Util ::Execution . execute ( [ 'crontab' , output_file . path ] , cronargs ) . to_s
148148 rescue => detail
149- raise FileReadError , _ ( 'Could not write crontab for %{path}: %{detail}' ) % { path : @path , detail : detail } , detail . backtrace
149+ raise FileReadError , _ ( 'Could not write crontab for %{path}: %{detail}' ) % ( { path : @path , detail : } ) , detail . backtrace
150150 ensure
151151 output_file . close
152152 output_file . unlink
@@ -174,15 +174,15 @@ def read
174174
175175 ''
176176 else
177- raise FileReadError , _ ( 'Could not read crontab for %{path}: %{detail}' ) % { path : @path , detail : detail } , detail . backtrace
177+ raise FileReadError , _ ( 'Could not read crontab for %{path}: %{detail}' ) % ( { path : @path , detail : } ) , detail . backtrace
178178 end
179179 end
180180
181181 # Remove a specific @path's cron tab.
182182 def remove
183183 Puppet ::Util ::Execution . execute ( [ 'crontab' , '-r' ] , cronargs ) . to_s
184184 rescue => detail
185- raise FileReadError , _ ( 'Could not remove crontab for %{path}: %{detail}' ) % { path : @path , detail : detail } , detail . backtrace
185+ raise FileReadError , _ ( 'Could not remove crontab for %{path}: %{detail}' ) % ( { path : @path , detail : } ) , detail . backtrace
186186 end
187187
188188 # Overwrite a specific @path's cron tab; must be passed the @path name
@@ -198,7 +198,7 @@ def write(text)
198198 File . chown ( Puppet ::Util . uid ( @path ) , nil , output_file . path )
199199 Puppet ::Util ::Execution . execute ( [ 'crontab' , output_file . path ] , cronargs ) . to_s
200200 rescue => detail
201- raise FileReadError , _ ( 'Could not write crontab for %{path}: %{detail}' ) % { path : @path , detail : detail } , detail . backtrace
201+ raise FileReadError , _ ( 'Could not write crontab for %{path}: %{detail}' ) % ( { path : @path , detail : } ) , detail . backtrace
202202 ensure
203203 output_file . close
204204 output_file . unlink
0 commit comments