<s> """<STR_LIT>""" <EOL> import datetime <EOL> import shlex <EOL> import subprocess <EOL> CMD_ADD = '<STR_LIT>' <EOL> CMD_COMMIT = '<STR_LIT>' % str ( datetime . datetime . now ( ) ) <EOL> CMD_PUSH = '<STR_LIT>' <EOL> class Deploy ( object ) : <EOL> def __init__ ( self , site , config ) : <EOL> """<STR_LIT>""" <EOL> self . site = site <EOL> self . config = config <EOL> self . path = config . get_option ( "<STR_LIT>" , "<STR_LIT:path>" ) <EOL> def execute ( self , command ) : <EOL> """<STR_LIT>""" <EOL> process = subprocess . Popen ( shlex . split ( command ) , cwd = self . path ) <EOL> process . communicate ( ) <EOL> def run ( self ) : <EOL> """<STR_LIT>""" <EOL> self . execute ( CMD_ADD ) <EOL> self . execute ( CMD_COMMIT ) <EOL> self . execute ( CMD_PUSH ) </s>
