def download(bug, supportconfig_only)
      bug.attachments.each do |attachment|
        filename = "bsc#{bug.id}-#{attachment.id}-#{attachment.props['file_name']}"
        if supportconfig_only
          next unless attachment.content_type == 'application/x-gzip' ||
                      attachment.content_type == 'application/x-bzip-compressed-tar'
          next unless attachment.summary =~ /supportconfig/i
        end
        t.say("Downloading to #{t.color(filename, :even_row)}")
        begin
          data = attachment.data
          File.open(filename, 'w') do |f|
            f.write data.read
          end
        rescue StandardError => e
          t.say("#{t.color('Error:', :error)} Download of #{filename} failed: #{e}")
          raise
        end
      end
    end
def download(bug, supportconfig_only)
      bug.attachments.each do |attachment|
        filename = "bsc#{bug.id}-#{attachment.id}-#{attachment.props['file_name']}"
        if supportconfig_only
          next unless attachment.content_type == 'application/x-gzip' ||
                      attachment.content_type == 'application/x-bzip-compressed-tar'
          next unless attachment.summary =~ /supportconfig/i
        end
        t.say("Downloading to #{t.color(filename, :even_row)}")
        begin
          data = attachment.data
          File.open(filename, 'w') do |f|
            f.write data.read
          end
        rescue StandardError => e
          t.say("#{t.color('Error:', :error)} Download of #{filename} failed: #{e}")
          raise
        end
      end
    end
check for supportconfigs and download