#NEWLINE# def lsb_release_codename( ) : #NEWLINE# #INDENT# "\n    Return the OS release's codename.\n    " #NEWLINE# if hasattr ( lsb_release_codename , '_cache' ) : #NEWLINE# #INDENT# return lsb_release_codename . _cache #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# p = subprocess . Popen ( [ 'lsb_release' , '-c' ] , stdout = subprocess . PIPE ) #NEWLINE# #UNINDENT# except OSError : #NEWLINE# #INDENT# lsb_release_codename . _cache = None #NEWLINE# return lsb_release_codename . _cache #NEWLINE# #UNINDENT# ( stdout , stderr ) = p . communicate ( ) #NEWLINE# if ( 0 != p . returncode ) : #NEWLINE# #INDENT# lsb_release_codename . _cache = None #NEWLINE# return lsb_release_codename . _cache #NEWLINE# #UNINDENT# match = re . search ( '\\t(\\w+)$' , stdout ) #NEWLINE# if ( match is None ) : #NEWLINE# #INDENT# lsb_release_codename . _cache = None #NEWLINE# return lsb_release_codename . _cache #NEWLINE# #UNINDENT# lsb_release_codename . _cache = match . group ( 1 ) #NEWLINE# return lsb_release_codename . _cache