mosen/puppet-cups — pull request #24 by leinaddm (2013-12-04 22:49:27+00:00)
Title: fix nil and regexp

these two commits deal with corner cases in the output of 'lpstat -p':

1) sometimes the output of 'lpstat -p' contains lines like 'Printer is now
on-line' or 'Ready to print'. In these cases facter (or a puppet run)
outputs the following warning:

Could not retrieve printers: undefined method `captures' for nil:NilClass

This patch ignores lines not starting with 'printers'

2) when a printer is printing the lpstat output is: 'printer name now printing'
and the previous regexp would skip the printer