def paster(*args, **kwargs):
 fail_on_error = kwargs.pop(u'fail_on_error', True)
 args = (list(args) + [(u'--config=' + config[u'__file__'])])
 (sys.stdout, sys.stderr) = (StringIO(u''), StringIO(u''))
 code = 0
 try:
  run(args)
 except SystemExit as e:
  code = e.code
 finally:
  (stdout, stderr) = (sys.stdout.getvalue(), sys.stderr.getvalue())
  (sys.stdout, sys.stderr) = (sys.__stdout__, sys.__stderr__)
 if ((code != 0) and fail_on_error):
  raise AssertionError(u'Paster command exited with non-zero return code {}: {}'.format(code, stderr))
 if (stderr.strip() and fail_on_error):
  raise AssertionError(u'Paster command wrote to STDERR: {}'.format(stderr))
 return (code, stdout, stderr)

def paster ( * args , ** kwargs ) : fail_on_error = kwargs . pop ( u'fail_on_error' , True ) args = ( list ( args ) + [ ( u'--config=' + config [ u'__file__' ] ) ] ) ( sys . stdout , sys . stderr ) = ( StringIO ( u'' ) , StringIO ( u'' ) ) code = 0 try : run ( args ) except SystemExit as e : code = e . code finally : ( stdout , stderr ) = ( sys . stdout . getvalue ( ) , sys . stderr . getvalue ( ) ) ( sys . stdout , sys . stderr ) = ( sys . __stdout__ , sys . __stderr__ ) if ( ( code != 0 ) and fail_on_error ) : raise AssertionError ( u'Paster command exited with non-zero return code {}: {}' . format ( code , stderr ) ) if ( stderr . strip ( ) and fail_on_error ) : raise AssertionError ( u'Paster command wrote to STDERR: {}' . format ( stderr ) ) return ( code , stdout , stderr )
call a paster command .