#NEWLINE# def checkUpdateUrl( cntlr , actualUrl ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# from arelle import WebCache , Version #NEWLINE# filename = os . path . basename ( actualUrl ) #NEWLINE# if ( filename and ( '-20' in filename ) ) : #NEWLINE# #INDENT# i = ( filename . index ( '-20' ) + 1 ) #NEWLINE# filenameDate = filename [ i : ( i + 10 ) ] #NEWLINE# versionDate = Version . version [ 0 : 10 ] #NEWLINE# if ( filenameDate > versionDate ) : #NEWLINE# #INDENT# reply = tkinter . messagebox . askyesnocancel ( _ ( 'arelle™ - Updater' ) , _ ( 'Update {0} is available, running version is {1}.  \n\nDownload now?    \n\n(Arelle will exit before installing.)' ) . format ( filenameDate , versionDate ) , parent = cntlr . parent ) #NEWLINE# if ( reply is None ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if reply : #NEWLINE# #INDENT# thread = threading . Thread ( target = ( lambda u = actualUrl : backgroundDownload ( cntlr , u ) ) ) #NEWLINE# thread . daemon = True #NEWLINE# thread . start ( ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( filenameDate < msg ) : #NEWLINE# #INDENT# msg = _ ( 'Arelle running version, {0}, is newer than the downloadable version, {1}.' ) . format ( versionDate , filenameDate ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# msg = _ ( 'Arelle running version, {0}, is the same as the downloadable version.' ) . format ( versionDate ) #NEWLINE# #UNINDENT# tkinter . messagebox . showwarning ( _ ( 'arelle™ - Updater' ) , msg , parent = cntlr . parent ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return