#NEWLINE# def stream_position( self ) : #NEWLINE# #INDENT# blobs = blobs . download_manager . blobs #NEWLINE# if ( not blobs ) : #NEWLINE# #INDENT# return 0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for i in xrange ( max ( blobs . iterkeys ( ) ) ) : #NEWLINE# #INDENT# if ( ( not ( i in blobs ) ) or ( ( not blobs [ i ] . is_validated ( ) ) and ( not ( i in self . provided_blob_nums ) ) ) ) : #NEWLINE# #INDENT# return i #NEWLINE# #UNINDENT# #UNINDENT# return ( max ( blobs . iterkeys ( ) ) + 1 )