<s> """<STR_LIT>""" <EOL> from google . storage . speckle . python . api import rdbms_googleapi <EOL> import apiclient <EOL> from django . core . management import base <EOL> from oauth2client import client <EOL> class Command ( base . NoArgsCommand ) : <EOL> """<STR_LIT>""" <EOL> requires_model_validation = False <EOL> can_import_settings = False <EOL> help = ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> def handle_noargs ( self , ** unused_options ) : <EOL> """<STR_LIT>""" <EOL> flow = rdbms_googleapi . GetFlow ( ) <EOL> self . stdout . write ( '<STR_LIT>' % <EOL> flow . step1_get_authorize_url ( '<STR_LIT>' ) ) <EOL> accepted = '<STR_LIT:n>' <EOL> while accepted . lower ( ) == '<STR_LIT:n>' : <EOL> accepted = raw_input ( '<STR_LIT>' ) <EOL> code = raw_input ( '<STR_LIT>' ) . strip ( ) <EOL> try : <EOL> credential = flow . step2_exchange ( code ) <EOL> except client . FlowExchangeError : <EOL> raise base . CommandError ( '<STR_LIT>' ) <EOL> self . stdout . write ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' % credential . refresh_token ) <EOL> self . stdout . write ( """<STR_LIT>""" % credential . refresh_token ) </s>
