#NEWLINE# def __init__( self , gen ) : #NEWLINE# #INDENT# self . content = None #NEWLINE# self . gen = gen #NEWLINE# github_url = GITHUB_API . format ( self . gen . settings [ 'GITHUB_USER' ] ) #NEWLINE# try : #NEWLINE# #INDENT# f = urlopen ( github_url ) #NEWLINE# encoding = f . headers [ 'content-type' ] . split ( 'charset=' ) [ ( - 1 ) ] #NEWLINE# c = f . read ( ) . decode ( encoding ) #NEWLINE# #UNINDENT# except HTTPError : #NEWLINE# #INDENT# logger . warning ( 'unable to open {0}' . format ( github_url ) ) #NEWLINE# return #NEWLINE# #UNINDENT# self . content = json . loads ( c )