#NEWLINE# def currentSpeed( self , i3s_output_list , i3s_config ) : #NEWLINE# #INDENT# stat = get_stat ( self . statistics_type ) #NEWLINE# color = None #NEWLINE# keys = list ( self . coloring . keys ( ) ) #NEWLINE# keys . sort ( ) #NEWLINE# for k in keys : #NEWLINE# #INDENT# if ( stat [ 'total' ] < ( ( k * 1024 ) * 1024 ) ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# color = self . coloring [ k ] #NEWLINE# #UNINDENT# #UNINDENT# response = { #NEWLINE# #INDENT# 'cached_until' : ( time ( ) + self . cache_timeout ) , #NEWLINE# 'full_text' : self . format . format ( total = self . _divide_and_format ( stat [ 'total' ] ) , up = self . _divide_and_format ( stat [ 'up' ] ) , down = self . _divide_and_format ( stat [ 'down' ] ) ) , #NEWLINE# 'transformed' : True , #NEWLINE# #UNINDENT# } #NEWLINE# if color : #NEWLINE# #INDENT# response [ 'color' ] = color #NEWLINE# #UNINDENT# return response