Ok, I will make all functions that return status values to raise exceptions if unsuccessful.

--
Sincerely,  
Alexander Kryklia
Отправлено при помощи Sparrow (http://www.sparrowmailapp.com/?sig)


вторник, 15 октября 2013 г. в 17:28, Ned Batchelder написал:

> In cms/djangoapps/contentstore/transcripts_utils.py:
> > + mime_type = 'application/json' > + filename = 'subs_{0}.srt.sjson'.format(subs_id) > + > + content_location = StaticContent.compute_location( > + item.location.org (http://item.location.org), item.location.course, filename) > + content = StaticContent(content_location, filename, mime_type, filedata) > + contentstore().save(content) > + del_cached_content(content_location) > + return content_location > + > + > +def get_transcripts_from_youtube(youtube_id): > + """ > + Gets transcripts from youtube for youtube_id. > + > + Returns (status, transcripts): bool, dict.  
> Thanks! I haven't finished reviewing the entire pull request, but if you could make this kind of change to all of the functions that return status values, that would be great, thanks.
> … (#)
> On Tue, Oct 15, 2013 at 10:21 AM, Alexander Kryklia < notifications@github.com (mailto:notifications@github.com)> wrote: In cms/djangoapps/contentstore/transcripts_utils.py: > + mime_type = 'application/json' > + filename = 'subs_{0}.srt.sjson'.format(subs_id) > + > + content_location = StaticContent.compute_location( > + item.location.org (http://item.location.org), item.location.course, filename) > + content = StaticContent(content_location, filename, mime_type, filedata) > + contentstore().save(content) > + del_cached_content(content_location) > + return content_location > + > + > +def get_transcripts_from_youtube(youtube_id): > + """ > + Gets transcripts from youtube for youtube_id. > + > + Returns (status, transcripts): bool, dict. Fixed: get_transcripts_from_youtube raises exception if unsuccessful. — Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/1111/files#r6971960> .  
>  
>  
> —
> Reply to this email directly or view it on GitHub (https://github.com/edx/edx-platform/pull/1111/files#r6972210).
>  
>  
>