I would prefer save them to a variable then make a logging call to each and
still need to have some form of variable for the retry logic
On Nov 28, 2013 9:21 PM, "Michael Tom-Wing" <notifications@github.com>
wrote:

> In src/freeseer/framework/youtube.py:
>
> > +
> > +        response = None
> > +        error = None
> > +        retry = 0
> > +        while response is None:
> > +            try:
> > +                log.info("Uploading %s" % video_file)
> > +                status, response = insert_request.next_chunk()
> > +                if 'id' in response:
> > +                    return "video id: %s was successfully uploaded." % response['id']
> > +                else:
> > +                    return "The upload failed with an unexpected response: %s" % response
> > +
> > +            except HttpError as e:
> > +                if e.resp.status in self.retriable_status_codes:
> > +                    error = "A retriable HTTP error %d occurred:\n%s" % (e.resp.status, e.content)
>
> Just log these errors where you catch them.
>
> The logger also supports printf/sprintf style formatting IIRC:
>
> log.info('A retriable HTTP error %d occured', e.resp.status)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Freeseer/freeseer/pull/402/files#r7994237>
> .
>