Module ImportFrom alias alias alias alias Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias alias Import alias ImportFrom alias alias Import alias ImportFrom alias alias ImportFrom alias Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore BinOpMult BinOpMult Num Num Num Assign NameStore Num Assign NameStore ListLoad Str Assign NameStore Dict Str NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad Str attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body With Call NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr If CompareIn Str NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num attr Str Index Num If CompareIn Str NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Num Index Num Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Num If CompareNotIn NameLoad ListLoad Str body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Num Return ListComp NameLoad comprehension NameStore NameLoad CompareEq Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body If UnaryOpNot NameLoad body Assign NameStore ListLoad Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str Assign NameStore SubscriptLoad Call NameLoad Str Index Num Assign NameStore BinOpAdd BinOpAdd SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Str Assign NameStore Call NameLoad ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr BoolOpAnd Call AttributeLoad NameLoad attr CompareNotIn NameLoad ListLoad Call AttributeLoad NameLoad attr Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr Str If NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad SubscriptLoad SubscriptLoad Call NameLoad Str Index Num Index Num attr Slice Num For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr If CompareNotIn NameLoad NameLoad body Continue Assign NameStore ListLoad Num Num Num Num Assign NameStore SubscriptLoad NameLoad Index Num TryExcept body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad ListComp BinOpMult Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad comprehension TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Continue For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareGt NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareNotEq NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad Call NameLoad Call AttributeLoad Str attr NameLoad Index Num Return BinOpAdd BinOpAdd SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args defaults vararg kwarg body Assign NameStore ListLoad Assign NameStore ListLoad Call AttributeLoad Str attr Call AttributeLoad NameLoad attr For NameStore ListLoad Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore ListComp NameLoad comprehension NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr BoolOpAnd Call AttributeLoad NameLoad attr CompareNotIn NameLoad NameLoad For NameStore NameLoad body If CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body For NameStore ListLoad NameLoad NameLoad NameLoad body For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str AugAssignAdd AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Expr Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str FunctionDef arguments args defaults body FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad NameLoad body Expr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body While NameLoad body Assign NameStore Str TryExcept body TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Num If CompareEq NameLoad Str body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Str orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Expr Call NameLoad BinOpAdd NameLoad Call AttributeLoad NameLoad attr Expr Call NameLoad handlers ExceptHandler type NameLoad body If CompareIsNot Call AttributeLoad NameLoad attr NameLoad body Break handlers ExceptHandler type NameLoad body Pass Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Assign NameStore NameLoad For NameStore ListLoad Str body For NameStore ListLoad NameLoad NameLoad body If CompareIn NameLoad NameLoad body Assign NameStore NameLoad Break If NameLoad body Break For NameStore ListLoad Str body If CompareIn NameLoad NameLoad body Assign NameStore NameLoad Break If BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot NameLoad body Raise Call NameLoad Str Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults kwarg body Expr Str Expr Call AttributeLoad NameLoad attr Str If UnaryOpNot NameLoad body Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Expr Call NameLoad Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad For NameStore NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr handlers ExceptHandler body Continue decorator_list Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Num TryFinally body Assign NameStore NameLoad While NameLoad body For NameStore NameLoad body TryExcept body Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad keyword NameLoad keyword Str keyword TupleLoad NameLoad NameLoad Str NameLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad keyword NameLoad keyword Str keyword TupleLoad NameLoad NameLoad Str NameLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad keyword NameLoad keyword Str keyword ListLoad NameLoad NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd NameLoad CompareIn NameLoad ListLoad Str body Expr Call AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Str While NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore Str TryExcept body AugAssignAdd NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Break Assign NameStore Str Assign NameStore Str While NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore Str TryExcept body AugAssignAdd NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Break Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad If BoolOpAnd NameLoad NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass Expr Call NameLoad Assign NameStore NameLoad Assign NameStore Num Break If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad orelse Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad finalbody For NameStore ListLoad Str Str Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body For NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If Call NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body TryExcept body Return Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Expr Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad Expr Call NameLoad NameLoad Str keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad Expr Call NameLoad NameLoad Str keyword NameLoad Expr Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr ExceptHandler type NameLoad name NameStore body Expr Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad Str keyword NameLoad Expr Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad NameLoad keyword NameLoad Expr Call NameLoad NameLoad Str keyword NameLoad Expr Call NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad NameLoad Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Return Call Call NameLoad NameLoad keyword SubscriptLoad SubscriptLoad NameLoad Index Num Index Num NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return CompareLtE Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad For NameStore NameLoad body If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore NameLoad If BoolOpAnd NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults kwarg body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd NameLoad NameLoad While Call NameLoad NameLoad body If Call NameLoad NameLoad body If Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Num orelse TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass orelse Break Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults vararg kwarg body Return Call Call NameLoad NameLoad keyword SubscriptLoad SubscriptLoad NameLoad Index Num Index Num NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If UnaryOpNot NameLoad body Assign NameStore Dict If UnaryOpNot NameLoad body Assign NameStore Num If UnaryOpNot NameLoad body Assign NameStore Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str NameLoad If CompareIs NameLoad NameLoad body FunctionDef arguments args NameParam defaults body Assign SubscriptStore NameLoad Index Str NameLoad decorator_list Assign NameStore NameLoad Assign NameStore ListLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore NameLoad Assign NameStore Str While UnaryOpNot NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore Str Assign NameStore ListLoad While NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Break If Call AttributeLoad NameLoad attr Str body TryExcept body Assign NameStore Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num handlers ExceptHandler body Pass If BoolOpAnd NameLoad NameLoad UnaryOpNot NameLoad body Assign NameStore Call NameLoad NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad NameLoad ListLoad NameLoad NameLoad NameLoad NameLoad Dict Assign NameStore NameLoad Assign NameStore ListLoad If NameLoad body While UnaryOpNot NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Break While NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Break If CompareIn NameLoad ListLoad Str body Expr Call NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call NameLoad NameLoad Raise Call NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call NameLoad NameLoad If CompareIn NameLoad ListLoad Str body Expr Call AttributeLoad NameLoad attr Str Assign NameStore NameLoad Assign SubscriptStore NameLoad Index Str Num orelse If CompareIn NameLoad ListLoad Str body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad Raise Call NameLoad Str orelse If BoolOpOr CompareIn NameLoad ListLoad Str BoolOpAnd NameLoad Call NameLoad NameLoad body Expr Call NameLoad NameLoad Assign NameStore NameLoad Break orelse Expr Call AttributeLoad NameLoad attr Num handlers ExceptHandler type TupleLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Num Expr Call AttributeLoad NameLoad attr Str Return SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args defaults vararg kwarg body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad NameLoad If BoolOpOr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults NameLoad body If UnaryOpNot NameLoad body Assign NameStore ListLoad If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad For NameStore NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return ListLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If CompareNotIn AttributeLoad NameLoad attr ListLoad Str Str Str Str Str body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad Dict Str Str Str Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Dict Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad keyword NameLoad Call NameLoad NameLoad TryExcept body Assign NameStore ListLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Num ExceptHandler type NameLoad name NameStore body Assign NameStore Num Expr Call AttributeLoad NameLoad attr Str ExceptHandler type NameLoad name NameStore body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num If BoolOpAnd CompareNotEq NameLoad Num Call NameLoad AttributeLoad NameLoad attr body While Call NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Num If CompareEq NameLoad Num body Assign NameStore Num Expr Call AttributeLoad NameLoad attr Str orelse If NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr For NameStore NameLoad body If CompareIn Str AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Num attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A __future__ absolute_import division print_function unicode_literals N/A 
Singleton executor
===================

This will call the 'CMDS' an allow only one execution at a time
system wide.

Once an execution has been triggered:

    - nothing can kill it except a kill -9
    - main loop (and not main program!) can maybe kill it after a timeout
    - Neither terminal closure or keyboard interrupt (SIGINT)
      can stop the execution
    - the commands are always executed in background while their output
      is given in realtime to the connected terminal

The behavior can be changed by tweaking:

    - one of the main threads
    - custom_communicate
    - get_callback_args
    - prepare_parser
    - do_custom_parser
    - get_worker_pids
    - get_deployer_pids
    - get_running_pids

 N/A re N/A traceback N/A copy N/A datetime N/A time N/A atexit N/A os N/A sys optparse OptionParser multiprocessing Process Pool Manager N/A signal Queue Empty Queue N/A logging subprocess Popen PIPE threading Thread N/A _name burp-client N/A logger N/A N/A logging getLogger N/A N/A {0}-main format _name N/A worker_logger N/A N/A logging getLogger N/A N/A {0}-worker format _name N/A to_logger N/A N/A logging getLogger N/A N/A {0}-timeout-watcher format _name N/A rawlogger N/A N/A logging getLogger N/A N/A {0}-rawlogger format _name N/A N/A rawlogger propagate False N/A LOG /var/log/burp-client N/A LOCK /var/run/burp-client.lock N/A DEFAULT_TIMEOUT N/A N/A 23 60 60 N/A DEFAULT_DELAY 5 N/A CMDS N/A burp -a t 2>&1 N/A OPTIONS N/A delay DEFAULT_DELAY get_container N/A N/A pid N/A N/A N/A lxc MAIN_HOST N/A cg N/A N/A /proc/{0}/cgroup format pid N/A N/A N/A N/A os path isfile cg N/A N/A N/A open cg fic N/A N/A content N/A N/A fic read N/A N/A lxc content N/A N/A lxc N/A N/A N/A N/A N/A N/A content split N/A 0 split : N/A -1 N/A N/A /lxc lxc N/A N/A lxc N/A N/A N/A lxc split /lxc/ 1 N/A 1 N/A lxc N/A is_lxc N/A N/A N/A N/A N/A container N/A get_container 1 N/A N/A container N/A MAIN_HOST N/A N/A True N/A False N/A filter_host_pids N/A N/A pids N/A N/A N/A thishost N/A get_container 1 N/A N/A a N/A a pids N/A N/A get_container a thishost N/A popen N/A N/A cargs shell N/A None True N/A N/A N/A cargs N/A N/A cargs N/A N/A N/A ret ps N/A None None N/A cargs N/A N/A ps N/A Popen cargs shell shell stdout PIPE stderr PIPE N/A ret N/A N/A ps communicate N/A N/A ret ps N/A get_worker_pids N/A N/A N/A args kwargs N/A N/A 
    Search worker process
     N/A ops N/A N/A popen ps aux|egrep 'burp -a'|grep -v grep|grep -v 'sh -c'|awk '{print $2}' N/A 0 N/A out N/A N/A N/A ops N/A 0 N/A ops N/A 1 N/A pids N/A filter_host_pids N/A N/A N/A a strip N/A a N/A N/A out split N/A N/A N/A a strip N/A a N/A N/A N/A os getpid N/A pidstimes N/A N/A chunk_re N/A N/A re compile [:-] N/A pids N/A N/A details N/A N/A N/A N/A N/A N/A popen ps -eo pid,etime,comm,args N/A 0 N/A 0 splitlines N/A 1 N/A line details N/A N/A infos N/A N/A line split N/A pid N/A N/A N/A infos N/A 0 strip N/A N/A pid pids N/A N/A N/A multipliers N/A 1 60 3600 86400 N/A etime N/A infos N/A 1 N/A N/A N/A N/A pidstimes N/A pid N/A sum N/A N/A N/A int a N/A multipliers N/A ix N/A N/A ix a N/A enumerate N/A N/A chunk_re split etime N/A N/A N/A Exception N/A N/A N/A N/A pid etime N/A N/A pidstimes items N/A N/A N/A etime DEFAULT_TIMEOUT N/A N/A N/A N/A logger info N/A N/A Killing old process: {0} format pid N/A N/A N/A os kill N/A int pid N/A signal SIGKILL N/A pids N/A a N/A a pids N/A a pid N/A pids N/A get_deployer_pids N/A N/A N/A args kwargs N/A N/A 
    Search program process
     N/A prog N/A N/A sys argv N/A 0 N/A pps N/A N/A popen N/A N/A ps aux|grep '{0}'|grep -v grep|awk '{{print $2}}' format prog N/A 0 N/A N/A N/A N/A pps N/A 0 N/A pps N/A 1 N/A get_running_pids N/A N/A N/A args kwargs N/A N/A ps N/A N/A filtered N/A N/A N/A {0} format N/A N/A os getpid N/A pids N/A N/A get_worker_pids args kwargs N/A get_deployer_pids args kwargs N/A N/A N/A N/A isinstance pids list N/A N/A pids N/A a N/A item N/A N/A N/A a strip N/A a N/A N/A pids split N/A N/A N/A a strip N/A a filtered N/A item pids N/A N/A N/A item ps N/A N/A N/A N/A ps append item N/A N/A filter_host_pids ps N/A logflush N/A N/A N/A N/A N/A lg N/A rawlogger worker_logger logger N/A N/A handler N/A lg handlers N/A N/A N/A N/A handler flush N/A init_file_logging N/A N/A logfile lvl N/A 0 N/A N/A l_format N/A N/A logging Formatter %(asctime)s [%(levelname)-5.5s] <%(name)s> %(message)s N/A r_format N/A N/A logging Formatter %(message)s N/A console_handler N/A N/A logging StreamHandler N/A N/A N/A console_handler setFormatter l_format N/A rconsole_handler N/A N/A logging StreamHandler N/A N/A N/A rconsole_handler setFormatter r_format N/A file_handler N/A N/A logging FileHandler logfile N/A N/A N/A file_handler setFormatter l_format N/A rfile_handler N/A N/A logging FileHandler logfile N/A N/A N/A rfile_handler setFormatter r_format N/A N/A N/A rawlogger addHandler rfile_handler N/A N/A N/A rawlogger addHandler rconsole_handler N/A root N/A N/A logging getLogger N/A N/A N/A root addHandler console_handler N/A N/A N/A root addHandler file_handler N/A N/A N/A rawlogger setLevel 0 N/A N/A N/A root setLevel lvl N/A Tee N/A object N/A __init__ N/A N/A self dup orig output file_output N/A True True N/A N/A N/A self buffer N/A N/A self dup dup N/A N/A self orig orig N/A N/A self output output N/A N/A self file_output file_output N/A write N/A N/A self s N/A N/A N/A N/A isinstance s unicode N/A N/A s N/A N/A s encode utf-8 N/A N/A self buffer s N/A N/A self output N/A N/A N/A N/A N/A self orig write s N/A N/A self file_output N/A N/A N/A N/A logger info s N/A N/A N/A self flush N/A flush N/A N/A self N/A N/A N/A N/A self output N/A N/A N/A logflush N/A N/A N/A N/A self orig flush N/A N/A init_worker N/A N/A lockfile N/A None N/A N/A 
    only and only if lockfile is not there anymore,
    do not ignore sigterm and even do it.
     handle_sigs N/A N/A N/A N/A handle_sigterm N/A N/A signum frame N/A N/A N/A N/A N/A N/A N/A os path exists lockfile N/A N/A N/A N/A worker_logger debug Worker has received sigterm ! N/A N/A resume_signals N/A N/A N/A os kill N/A N/A os getpid N/A signal SIGTERM N/A N/A N/A N/A signal signal N/A signal SIGTERM handle_sigterm N/A N/A N/A signal signal N/A signal SIGINT N/A signal SIG_IGN N/A N/A handle_sigs N/A resume_signals N/A N/A N/A N/A N/A N/A N/A signal signal N/A signal SIGTERM N/A signal SIG_DFL N/A N/A N/A signal signal N/A signal SIGINT N/A signal SIG_DFL N/A ProcessError N/A Exception N/A N/A . N/A TimeoutError N/A Exception N/A N/A . N/A InterruptError N/A ProcessError KeyboardInterrupt N/A N/A . N/A printer N/A N/A io_q p_q logfile proc N/A N/A N/A True N/A N/A line N/A N/A N/A N/A N/A N/A identifier line N/A N/A io_q get True 1 N/A N/A identifier STDERR N/A N/A meth N/A rawlogger error N/A e E:  N/A N/A meth N/A rawlogger info N/A e S:  N/A N/A isinstance line unicode N/A N/A line N/A str N/A N/A line encode utf-8 N/A N/A meth N/A e N/A N/A line strip N/A N/A logflush N/A N/A N/A Empty N/A N/A N/A N/A N/A proc poll None N/A N/A N/A N/A N/A Exception N/A N/A N/A N/A N/A p_q put d N/A stream_watcher N/A N/A io_q p_q identifier stream_queue stream N/A N/A N/A line stream N/A N/A N/A N/A stream_queue put line N/A N/A N/A io_q put N/A identifier line N/A N/A N/A stream closed N/A N/A N/A N/A stream close N/A N/A N/A p_q put d N/A custom_communicate N/A N/A proc stdout stderr delay N/A None None None N/A N/A retry_loop False N/A test N/A SSL connect error N/A N/A std N/A stdout stderr N/A N/A N/A test std N/A N/A retry_loop True N/A N/A retry_loop N/A N/A N/A test N/A Phase 1 begin N/A N/A N/A test std N/A N/A retry_loop False N/A N/A N/A N/A proc returncode N/A retry_loop N/A N/A N/A Exception stopped due to non zero return code N/A N/A retry_loop delay stdout stderr N/A deploy N/A N/A callback_args loglevel logfile lock N/A kwargs N/A N/A 
    The real deploy work is done here !
     N/A N/A N/A worker_logger info start - deploy N/A N/A kwargs N/A N/A kwargs N/A N/A delay N/A N/A kwargs get delay None N/A N/A kwargs N/A loglevel loglevel N/A N/A kwargs N/A logfile logfile N/A N/A kwargs N/A lock lock N/A N/A logflush N/A fic N/A open lock w N/A N/A N/A fic write locked N/A N/A N/A fic flush N/A N/A N/A fic close N/A pids N/A N/A N/A os getpid handle_sigusr2 N/A N/A signum frame N/A N/A N/A N/A N/A pids reverse N/A N/A clean_locks lock N/A N/A N/A worker_logger debug Worker has received termination request ! N/A N/A logflush N/A pid pids N/A N/A N/A N/A N/A N/A logger error N/A N/A killing pid: {0} format pid N/A N/A N/A os kill pid N/A signal SIGKILL N/A N/A N/A N/A N/A N/A N/A N/A signal signal N/A signal SIGUSR2 handle_sigusr2 N/A exitcode 0 N/A N/A N/A do_loop True N/A do_loop N/A N/A cmd CMDS N/A N/A N/A N/A io_q N/A Queue N/A p_q N/A Queue N/A streamout_queue N/A Queue N/A streamerr_queue N/A Queue N/A N/A isinstance cmd list N/A N/A cmd N/A N/A N/A a format callback_args kwargs N/A a cmd N/A proc N/A Popen cmd stdout PIPE stderr PIPE N/A N/A cmd N/A N/A cmd format callback_args kwargs N/A proc N/A Popen cmd shell True stdout PIPE stderr PIPE N/A threads N/A N/A N/A N/A threads append N/A N/A N/A Thread target stream_watcher name stderr-watcher args N/A io_q p_q STDERR streamerr_queue N/A proc stderr start N/A N/A N/A threads append N/A N/A N/A Thread target stream_watcher name stdout-watcher args N/A io_q p_q STDOUT streamout_queue N/A proc stdout start N/A N/A N/A threads append N/A N/A N/A Thread target printer name printer args N/A io_q p_q logfile proc start N/A N/A N/A proc wait N/A t threads N/A N/A ret N/A N/A p_q get N/A N/A t N/A ret N/A d N/A N/A N/A N/A t join N/A stdout N/A buf N/A True N/A N/A N/A N/A content N/A N/A streamout_queue get_nowait N/A buf N/A N/A content N/A buf content N/A buf N/A N/A N/A stdout content N/A N/A N/A UnicodeDecodeError N/A N/A buf content N/A N/A N/A Empty N/A N/A N/A stderr N/A buf N/A True N/A N/A N/A N/A content N/A N/A streamerr_queue get_nowait N/A buf N/A N/A content N/A buf content N/A buf N/A N/A N/A stderr content N/A N/A N/A UnicodeDecodeError N/A N/A buf content N/A N/A N/A Empty N/A N/A N/A N/A do_loop delay stdout stderr N/A custom_communicate proc stdout stderr delay N/A N/A do_loop delay N/A N/A N/A print N/A N/A Looping again in {0}s format delay N/A delay N/A N/A N/A N/A time sleep delay N/A N/A N/A Exception N/A ex N/A N/A N/A N/A worker_logger error N/A N/A {0} failed format cmd N/A N/A N/A worker_logger error N/A N/A {0} format ex N/A N/A N/A N/A N/A worker_logger error N/A N/A {0} format N/A N/A traceback format_exc N/A N/A N/A Exception N/A N/A N/A N/A logflush N/A do_loop False N/A exitcode 1 N/A N/A N/A exitcode N/A N/A N/A N/A worker_logger info Worker has deployed successfully N/A N/A logflush N/A N/A N/A N/A worker_logger error Worker has failed the deployment N/A N/A logflush N/A N/A i N/A loglevel logfile lock N/A N/A N/A N/A kwargs pop i None N/A N/A clean_locks lock N/A exitcode N/A toggle_log N/A N/A output file_output N/A True True N/A N/A std N/A N/A sys stderr N/A sys stdout N/A N/A N/A isinstance std Tee N/A N/A N/A std output output N/A N/A std file_output file_output N/A blind_send N/A N/A que msg logfile N/A None N/A N/A N/A N/A N/A N/A que put msg N/A N/A N/A Exception N/A N/A N/A toggle_log False True N/A msg N/A N/A {0}: {1} format Detached worker msg N/A N/A N/A logger info msg N/A N/A toggle_log False False N/A communicator N/A N/A func logfile N/A None N/A N/A Warning, this is a picklable decorator ! _call N/A N/A protocol_queue messages_queue args kwargs N/A N/A N/A called with [queue, args, kwargs] as first optionnal arg N/A N/A N/A logger debug start - worker N/A N/A kwargs N/A multiprocess_protocol_queue protocol_queue N/A N/A kwargs N/A multiprocess_messages_queue messages_queue N/A ret None N/A N/A N/A N/A N/A protocol_queue put N/A N/A pid:{0} format N/A N/A os getpid N/A ret N/A func args kwargs N/A N/A resume_signals N/A N/A blind_send protocol_queue END logfile logfile N/A N/A N/A TimeoutError N/A ex N/A N/A N/A blind_send messages_queue N/A ex message logfile logfile N/A N/A blind_send protocol_queue TIMEOUT logfile logfile N/A N/A resume_signals N/A trace N/A N/A traceback format_exc N/A N/A Exception N/A ex N/A N/A N/A resume_signals N/A trace N/A N/A traceback format_exc N/A N/A blind_send messages_queue An unmanaged exception has been raised: logfile logfile N/A N/A blind_send messages_queue N/A N/A {0}
{1} format ex trace logfile logfile N/A N/A blind_send protocol_queue ERROR logfile logfile N/A N/A resume_signals N/A N/A N/A logger info end - worker N/A N/A toggle_log False False N/A ret N/A N/A _call N/A _run_deploy N/A N/A N/A args kwargs N/A N/A N/A N/A communicator deploy logfile N/A N/A args N/A 2 N/A 1 args kwargs N/A in_time N/A N/A endto N/A N/A N/A N/A N/A N/A time time endto N/A terminate N/A N/A pools N/A N/A N/A N/A N/A isinstance pools list N/A N/A pools N/A pools N/A pool pools N/A N/A N/A pool None N/A N/A N/A N/A pool terminate N/A N/A N/A pool join N/A is_locked N/A N/A lockfile N/A N/A N/A ret False N/A N/A lockfile N/A N/A N/A os path exists lockfile N/A N/A ret True N/A ret N/A timer_terminator N/A N/A timeout pid logfile lockfile N/A kwargs N/A N/A snow N/A N/A N/A N/A N/A datetime datetime now strftime %Y-%m-%d %H:%M:%S N/A to_msg N/A N/A Process {0} started at {1} did not finished  after a timeout of {2}s under and was killed format pid snow timeout N/A snow N/A N/A N/A N/A N/A datetime datetime now strftime %Y-%m-%d %H:%M:%S N/A N/A N/A to_msg format snow timeout N/A now N/A N/A time time N/A endto N/A now timeout N/A N/A is_locked lockfile N/A N/A N/A is_locked lockfile N/A N/A N/A in_time endto N/A N/A N/A N/A time sleep 0.01 N/A N/A N/A N/A N/A N/A os kill pid N/A signal SIGUSR2 N/A N/A N/A to_logger error to_msg N/A N/A TimeoutError to_msg N/A N/A N/A OSError N/A N/A N/A N/A N/A N/A N/A signal signal N/A signal SIGTERM N/A signal SIG_DFL N/A N/A N/A os kill N/A N/A os getpid N/A signal SIGTERM N/A _run_timer_terminator N/A N/A N/A args kwargs N/A N/A N/A N/A communicator timer_terminator logfile N/A N/A args N/A 2 N/A 1 args kwargs N/A enter_mainloop N/A N/A target args kwargs pool pool_size protocol_queue messages_queue callback exit_callback lockfile logfile timeout delay stdout_tee stderr_tee N/A None None None None None None None None None None None None None None N/A N/A 
    Manage a multiprocessing pool

    - If the protocol queue does not output anything, the pool runs
      indefinitly

    - If the protocol queue returns KEYBOARDINT or ERROR, this will kill the
      pool totally calling terminate & join and ands with a ProcessError
      exception notifying callers from the abnormal termination

    - If the protocol queue returns END or callback is defined and returns
      True, it just join the process and return the data.

    - If the process expires the timeout, it will throw a TimeoutError

    target
        the function you want to execute in multiproccessing
    timeout
        process will be terminated if not done until timeout
    pool
        pool object can be None if you want a default pool, but you ll
        have then to define pool_size instead
    pool_size
        pool size if you did not provide yourself a pool
    callback
        any callback that returns a boolean and takes a string in argument
        which returns True to signal that 'target' is finished
        and we need to join the pool
    exit_callback
        a callcack taking the result of the function being processed
        and return it after eventual post processing
    delay
        if the main loop is retried, sleep a litte time (seconds)
    stdout_tee
        Tee tee object tied to stdout of the execution
    stderr_tee
        Tee tee object tied to stdin of the execution
    args
        positionnal arguments to call the function with
        if you dont want to use pool.map
    kwargs
        kwargs to give to the function in case of process
    Attention, the function must have the following signature:

            target(protocol_queue, message_queue, args, kwargs)

    You may use the 'communicator' decorator to generate such a function
    (see end of this file) but your final function must accept kwargs.
     N/A N/A kwargs N/A N/A kwargs N/A N/A N/A pool_size N/A N/A pool_size 1 N/A N/A pool N/A N/A pool N/A Pool pool_size N/A init_worker lockfile N/A manager N/A Manager N/A N/A protocol_queue N/A N/A protocol_queue N/A N/A manager Queue N/A N/A messages_queue N/A N/A messages_queue N/A N/A manager Queue N/A to_m_queue N/A N/A manager Queue N/A to_p_queue N/A N/A manager Queue N/A ret N/A return None N/A N/A exit_callback None N/A exit_callback N/A N/A fret N/A N/A N/A N/A ret N/A return fret N/A N/A finished False N/A pools N/A pool N/A N/A N/A N/A N/A pool apply_async target N/A protocol_queue messages_queue args kwargs callback exit_callback N/A to_pool None N/A pid N/A N/A finished N/A N/A N/A N/A test N/A N/A protocol_queue get_nowait N/A N/A N/A Empty N/A N/A test NO_PROTOCOL_CLUE N/A msgs N/A N/A True N/A N/A N/A N/A N/A N/A msgs append N/A N/A messages_queue get_nowait N/A N/A N/A Empty N/A N/A N/A N/A N/A test startswith pid: N/A N/A N/A N/A pid N/A int N/A N/A N/A test split pid: N/A 1 N/A N/A N/A N/A N/A N/A pid timeout N/A to_pool N/A N/A to_pool N/A Pool pool_size N/A init_worker lockfile N/A N/A N/A pools append to_pool N/A N/A N/A to_pool apply_async _run_timer_terminator N/A to_p_queue to_m_queue N/A timeout pid logfile lockfile N/A N/A timeout_test None N/A to_msgs N/A N/A to_pool N/A N/A N/A timeout_test N/A N/A N/A N/A timeout_test N/A N/A to_p_queue get_nowait N/A N/A N/A Empty N/A N/A N/A True N/A N/A N/A N/A N/A N/A to_msgs append N/A N/A to_m_queue get_nowait N/A N/A N/A Empty N/A N/A N/A N/A timeout_test N/A TIMEOUT N/A N/A N/A terminate pools N/A to_msgs N/A N/A join to_msgs N/A N/A print to_msgs N/A N/A TimeoutError to_msgs N/A msgs N/A N/A msgs N/A N/A join msgs N/A N/A print msgs N/A N/A test N/A KEYBOARDINT N/A N/A N/A N/A logger error User interrupt, we will continue deployment N/A finished True N/A N/A ret N/A return -1 N/A N/A N/A test N/A ERROR N/A N/A N/A N/A logger error Aborting due to errors N/A N/A terminate pools N/A N/A ProcessError process did not finished correctly N/A N/A N/A N/A test N/A END N/A callback N/A callback test N/A N/A N/A terminate pools N/A finished True N/A N/A N/A N/A N/A time sleep 0.125 N/A N/A N/A N/A KeyboardInterrupt SystemExit N/A N/A N/A ret N/A return -1 N/A N/A N/A logger info User issued keyboard or interrupt from main program, we continue the deployment in background N/A N/A ret N/A return N/A test_deploy N/A N/A N/A args kwargs N/A N/A deploy_lock N/A kwargs N/A deploy_lock N/A deploy_log N/A kwargs N/A deploy_log N/A pids N/A get_running_pids args kwargs N/A N/A pids N/A N/A N/A os path exists deploy_lock N/A N/A N/A pids N/A N/A N/A N/A logger info N/A N/A Stale lock, interrupted program?
We will delete the {DEPLOY_LOCK} file format DEPLOY_LOCK deploy_lock N/A N/A N/A os remove deploy_lock N/A N/A N/A N/A logger info N/A N/A Already in progress (pids: {0})
If something did go wrong, please delete the {DEPLOY_LOCK} file.
This program run multiple proceses, so multiple pids is normal format pids DEPLOY_LOCK deploy_lock N/A N/A N/A os system N/A N/A ps aufx -C4|egrep '{0}'|grep -v grep format N/A N/A | join pids N/A N/A N/A logger info N/A N/A You can attach to and read the log file with:
   tail -f {0} format deploy_log N/A N/A N/A sys exit 128 N/A clean_locks N/A N/A locks N/A None N/A N/A N/A locks N/A N/A locks N/A N/A N/A isinstance locks basestring N/A N/A locks N/A locks N/A lock locks N/A N/A N/A N/A N/A os path exists lock N/A N/A N/A N/A N/A N/A os unlink lock N/A N/A N/A Exception N/A ex N/A N/A N/A N/A logger ingo N/A N/A problem while removing {0}
{1} format lock ex N/A prepare_parser N/A N/A parser N/A N/A N/A parser N/A do_custom_parse N/A N/A parser options args N/A N/A N/A N/A parser options args N/A get_callback_args N/A N/A parser options args N/A N/A N/A N/A N/A main N/A N/A N/A N/A N/A parser N/A OptionParser N/A tmpdir N/A N/A N/A os environ get TMPDIR /tmp N/A N/A N/A parser add_option -l dest loglevel help debug|error|info|all|quiet default info N/A N/A N/A parser add_option --async dest async action store_false default True N/A N/A N/A parser add_option --retry-delay dest delay action store default DEFAULT_DELAY N/A N/A N/A parser add_option --tmpdir dest tmpdir default tmpdir N/A N/A N/A parser add_option -t --timeout type int dest timeout default DEFAULT_TIMEOUT N/A N/A N/A parser add_option --deploy-log dest deploy_log default LOG N/A N/A N/A parser add_option --deploy-lock dest deploy_lock default LOCK N/A parser N/A prepare_parser parser N/A N/A options args N/A N/A parser parse_args N/A N/A N/A options loglevel N/A debug quiet error info all N/A N/A N/A ValueError invalid loglevel N/A lvl N/A N/A logging getLevelName N/A N/A N/A N/A N/A all quiet debug error get N/A options loglevel N/A options loglevel upper N/A N/A parser options args N/A do_custom_parse parser options args N/A N/A options deploy_lock N/A N/A N/A options deploy_lock format N/A vars options N/A N/A options deploy_log N/A N/A N/A options deploy_log format N/A vars options N/A N/A init_file_logging N/A options deploy_log lvl N/A stdout_tee N/A Tee N/A sys stdout N/A sys __stdout__ N/A stderr_tee N/A Tee N/A sys stderr N/A sys __stderr__ N/A N/A N/A logger info start N/A N/A N/A OPTIONS update N/A delay N/A options delay N/A callback_args N/A get_callback_args parser options args N/A N/A test_deploy callback_args callback_args N/A vars options N/A N/A N/A args N/A callback_args N/A options loglevel N/A options deploy_log N/A options deploy_lock N/A ckwargs N/A N/A copy deepcopy OPTIONS N/A N/A N/A options async N/A N/A exitcode N/A deploy args ckwargs N/A N/A exitcode N/A enter_mainloop _run_deploy args args kwargs ckwargs lockfile N/A options deploy_lock logfile N/A options deploy_log timeout N/A options timeout delay N/A options delay stderr_tee stderr_tee stdout_tee stdout_tee N/A N/A N/A ProcessError N/A N/A N/A N/A logger error processerror N/A N/A N/A logger error N/A N/A traceback format_exc N/A exitcode 128 N/A N/A TimeoutError N/A ex N/A N/A exitcode 127 N/A N/A N/A logger error Deployment has been killed after a timeout N/A N/A Exception N/A ex N/A N/A trace N/A N/A traceback format_exc N/A N/A N/A logger error Unknown error N/A N/A N/A logger error N/A N/A {0} format ex N/A N/A N/A logger error trace N/A exitcode 126 N/A N/A N/A exitcode -1 N/A is_locked N/A options deploy_lock N/A N/A N/A is_locked N/A options deploy_lock N/A N/A N/A print still locked N/A N/A N/A time sleep 0.5 N/A N/A exitcode -1 N/A N/A exitcode 0 N/A N/A N/A logger info Deployment is continued in background N/A N/A exitcode N/A N/A N/A N/A logger error Deployment failed N/A N/A N/A N/A logger info Deployment success N/A N/A toggle_log False True N/A rorder N/A range N/A len N/A atexit _exithandlers N/A N/A N/A rorder reverse N/A i rorder N/A N/A N/A multiprocessing N/A N/A N/A N/A atexit _exithandlers N/A i N/A 0 __module__ N/A N/A N/A N/A N/A atexit _exithandlers pop i N/A N/A N/A sys exit exitcode N/A N/A N/A __name__ __main__ N/A N/A N/A main