Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam defaults Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body TryExcept body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If CompareIn Str Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str orelse Raise decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str While BoolOpOr CompareEq NameLoad Num CompareLt BinOpSub Call AttributeLoad NameLoad attr NameLoad NameLoad body TryExcept body Assign NameStore Call NameLoad keyword SubscriptLoad AttributeLoad NameLoad attr Index Str keyword NameLoad keyword Str keyword SubscriptLoad AttributeLoad NameLoad attr Index Str keyword AttributeLoad NameLoad attr keyword SubscriptLoad AttributeLoad NameLoad attr Index Str keyword SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If CompareIn Str Call NameLoad NameLoad body Raise Call NameLoad Call NameLoad NameLoad If CompareIn Str Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Continue Raise Raise Call NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Assign AttributeStore NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr CompareLt AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareLt Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type AttributeLoad NameLoad attr body Pass TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type AttributeLoad NameLoad attr body Pass decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad ListLoad If CompareNotEq Call NameLoad NameLoad Num body Return Num Return Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ListLoad NameLoad Str If UnaryOpNot NameLoad body Return If Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ListLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ListLoad NameLoad Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str Expr Yield TupleLoad NameLoad NameLoad SubscriptLoad NameLoad Index Str If NameLoad body AugAssignSub NameStore Call NameLoad NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareLtE NameLoad Num body Break decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad If NameLoad body AugAssignSub NameStore Call NameLoad NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareLtE NameLoad Num body Break Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ListLoad NameLoad Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad Assign NameStore ListLoad For NameStore NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ListLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If CompareNotEq SubscriptLoad NameLoad Index Num Str body AugAssignAdd NameStore Str AugAssignAdd NameStore Str Assign NameStore Str Assign NameStore ListLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body AugAssignAdd NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Assign NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Str Assign NameStore Dict For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str If CompareIn NameLoad NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad TupleLoad NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad Dict NameLoad TupleLoad NameLoad NameLoad Assign NameStore Num For NameStore Call NameLoad NameLoad body Expr Yield TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad AugAssignAdd NameStore Num If BoolOpAnd NameLoad CompareGtE NameLoad NameLoad body Return decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ListLoad NameLoad Str Assign NameStore Call NameLoad BoolOpOr NameLoad ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore NameLoad orelse Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpOr NameLoad CompareIn NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad NameLoad If CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad If NameLoad body If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse If NameLoad body With AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body With AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Str Assign NameStore ListLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr With AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign NameStore ListLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad Assign NameStore Dict Assign NameStore ListLoad For TupleStore NameStore NameStore NameStore NameStore NameLoad body Assign SubscriptStore Call AttributeLoad NameLoad attr NameLoad Dict Index NameLoad ListLoad NameLoad NameLoad For NameStore NameLoad body For NameStore SubscriptLoad NameLoad Index NameLoad body Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad Index Num Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad Index Num Expr Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Dict Assign NameStore Dict Assign NameStore Dict Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str ListLoad Assign SubscriptStore NameLoad Index Str ListLoad Assign SubscriptStore NameLoad Index Str ListLoad Assign NameStore Dict Assign SubscriptStore NameLoad Index Str ListLoad Assign SubscriptStore NameLoad Index Str ListLoad For TupleStore NameStore NameStore NameStore NameStore NameLoad body If CompareNotIn NameLoad SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr ListLoad NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad If CompareNotIn NameLoad SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr ListLoad NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad AugAssignAdd SubscriptStore NameLoad Index Str Call AttributeLoad Str attr BinOpMult ListLoad Str BinOpDiv Call NameLoad SubscriptLoad NameLoad Index Str Num AugAssignAdd SubscriptStore NameLoad Index Str Call AttributeLoad Str attr BinOpMult ListLoad Str BinOpDiv Call NameLoad SubscriptLoad NameLoad Index Str Num AugAssignAdd SubscriptStore NameLoad Index Str Call AttributeLoad Str attr BinOpMult ListLoad Str BinOpDiv Call NameLoad SubscriptLoad NameLoad Index Str Num Return ListLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str While NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr TryFinally body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIn Str Call NameLoad NameLoad body Raise NameLoad orelse Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num finalbody Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str While NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr TryFinally body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIn Str Call NameLoad NameLoad body Raise NameLoad orelse Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num finalbody Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Dict For NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Return Call AttributeLoad Call AttributeLoad NameLoad attr attr Str handlers ExceptHandler type NameLoad body If Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Return Call AttributeLoad Call NameLoad NameLoad attr Str orelse Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If CompareIn NameLoad TupleLoad Str Str body Return Call NameLoad NameLoad orelse If CompareEq NameLoad Str body Return Call AttributeLoad NameLoad attr NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Assign NameStore Str If CompareIsNot NameLoad NameLoad body If NameLoad body AugAssignAdd NameStore Str Assign NameStore BinOpAdd NameLoad Str AugAssignAdd NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad orelse AugAssignAdd NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad TupleLoad NameLoad NameLoad body AugAssignAdd NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Str If NameLoad body AugAssignAdd NameStore Str If BoolOpOr CompareIs NameLoad NameLoad CompareEq NameLoad AttributeLoad NameLoad attr body AugAssignAdd NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Str If NameLoad body AugAssignAdd NameStore BinOpMod Str Call NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr ListLoad Str NameLoad NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Dict Str Str Str ListLoad NameLoad Assign NameStore Dict Str Str Str ListLoad NameLoad Assign NameStore Dict Str Str Str ListLoad NameLoad If NameLoad body AugAssignAdd SubscriptStore NameLoad Index Str Str Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad If Call NameLoad NameLoad TupleLoad NameLoad NameLoad body AugAssignAdd SubscriptStore NameLoad Index Str Str Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Call NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Dict Str Str Str ListLoad NameLoad Return ListLoad NameLoad NameLoad Return ListLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Num Assign NameStore Call NameLoad BoolOpOr NameLoad Num If CompareIs NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore Call NameLoad NameLoad If BoolOpAnd CompareEq NameLoad Num CompareEq NameLoad NameLoad body Return NameLoad orelse Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad If CompareIs NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad BinOpMult BinOpAdd Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Str Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad BinOpMult Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad BinOpMult BinOpAdd Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Str Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Num BinOpSub BinOpDiv AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore ListLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad For NameStore NameLoad body If BoolOpAnd CompareEq SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr CompareEq SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr body Return orelse Raise Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list decorator_list
N/A N/A An implementation of a data store based on mysql. N/A logging N/A Queue N/A thread N/A threading N/A time N/A MySQLdb MySQLdb cursors grr.lib aff4 grr.lib config_lib grr.lib data_store grr.lib rdfvalue grr.lib utils Error N/A N/A data_store Error N/A N/A Base class for all exceptions in this module. N/A SafeQueue N/A N/A Queue Queue N/A N/A Queue with RLock instead of Lock. __init__ N/A N/A self maxsize N/A 0 N/A N/A N/A N/A N/A Queue Queue __init__ self maxsize maxsize N/A N/A self mutex N/A N/A threading RLock N/A N/A self not_empty N/A N/A threading Condition N/A self mutex N/A N/A self not_full N/A N/A threading Condition N/A self mutex N/A N/A self all_tasks_done N/A N/A threading Condition N/A self mutex N/A N/A MySQLConnection N/A object N/A N/A A Class to manage MySQL database connections. __init__ N/A N/A self database_name N/A N/A N/A N/A N/A N/A self dbh N/A N/A self _MakeConnection database database_name N/A N/A self cursor N/A N/A N/A self dbh cursor N/A N/A N/A N/A N/A self cursor connection autocommit True N/A N/A N/A N/A self cursor execute SET NAMES binary N/A N/A N/A N/A MySQLdb OperationalError N/A e N/A N/A N/A Unknown database N/A str e N/A N/A dbh N/A N/A self _MakeConnection N/A cursor N/A N/A dbh cursor N/A N/A N/A N/A cursor connection autocommit True N/A N/A N/A cursor execute N/A Create database `%s` database_name N/A N/A N/A cursor close N/A N/A N/A dbh close N/A N/A self dbh N/A N/A self _MakeConnection database database_name N/A N/A self cursor N/A N/A N/A self dbh cursor N/A N/A N/A N/A N/A self cursor connection autocommit True N/A N/A N/A N/A self cursor execute SET NAMES binary N/A N/A N/A _MakeConnection N/A N/A self database N/A N/A N/A Repeat connection attempts to server until we get a valid connection. N/A first_attempt_time N/A N/A time time N/A wait_time N/A N/A config_lib CONFIG N/A Mysql.max_connect_wait N/A N/A N/A wait_time 0 N/A N/A N/A N/A time time first_attempt_time wait_time N/A N/A N/A N/A connection_args N/A dict user N/A N/A config_lib CONFIG N/A Mysql.database_username db database charset utf8 passwd N/A N/A config_lib CONFIG N/A Mysql.database_password cursorclass N/A cursors DictCursor host N/A N/A config_lib CONFIG N/A Mysql.host port N/A N/A config_lib CONFIG N/A Mysql.port N/A dbh N/A N/A MySQLdb connect connection_args N/A dbh N/A N/A N/A N/A MySQLdb OperationalError N/A e N/A N/A N/A Access denied N/A str e N/A N/A N/A Error N/A str e N/A N/A Can't connect N/A str e N/A N/A N/A N/A logging warning Datastore connection retrying after failed with %s. N/A str e N/A N/A N/A time sleep 0.5 N/A N/A N/A N/A IOError Unable to connect to Mysql database. N/A N/A ConnectionPool N/A object N/A N/A A pool of connections to the mysql server.

  Uses unfinished_tasks to track the number of open connections.
   __init__ N/A N/A self database_name N/A N/A N/A N/A self connections N/A SafeQueue N/A N/A self database_name database_name N/A N/A self pool_max_size N/A int N/A N/A config_lib CONFIG N/A Mysql.conn_pool_max N/A N/A self pool_min_size N/A int N/A N/A config_lib CONFIG N/A Mysql.conn_pool_min N/A _ N/A range N/A self pool_min_size N/A N/A N/A N/A N/A self connections put N/A MySQLConnection N/A self database_name N/A GetConnection N/A N/A self N/A N/A N/A N/A N/A N/A N/A self connections empty N/A N/A N/A self connections unfinished_tasks N/A self pool_max_size N/A N/A N/A N/A N/A self connections put N/A MySQLConnection N/A self database_name N/A connection N/A N/A N/A self connections get block True N/A connection N/A PutConnection N/A N/A self connection N/A N/A N/A N/A N/A N/A N/A self connections qsize N/A self pool_min_size N/A N/A N/A N/A N/A self connections put connection N/A N/A N/A N/A self DropConnection connection N/A DropConnection N/A N/A self connection N/A N/A N/A Attempt to cleanly drop the connection. N/A N/A N/A N/A N/A N/A connection cursor close N/A N/A N/A N/A MySQLdb Error N/A N/A N/A N/A N/A N/A N/A N/A connection dbh close N/A N/A N/A N/A MySQLdb Error N/A N/A N/A N/A MySQLAdvancedDataStore N/A N/A data_store DataStore N/A N/A A mysql based data store. N/A POOL None __init__ N/A N/A self N/A N/A N/A N/A self database_name N/A N/A config_lib CONFIG N/A Mysql.database_name N/A N/A N/A MySQLAdvancedDataStore POOL None N/A N/A N/A MySQLAdvancedDataStore POOL N/A ConnectionPool N/A self database_name N/A N/A self pool N/A self POOL N/A N/A self to_replace N/A N/A N/A self to_insert N/A N/A N/A N/A self _CalculateAttributeStorageTypes N/A N/A self database_name N/A N/A config_lib CONFIG N/A Mysql.database_name N/A N/A self buffer_lock N/A N/A threading RLock N/A N/A self lock N/A N/A threading RLock N/A N/A N/A N/A super MySQLAdvancedDataStore self __init__ N/A Initialize N/A N/A self N/A N/A N/A N/A N/A N/A super MySQLAdvancedDataStore self Initialize N/A N/A N/A N/A N/A self ExecuteQuery desc `aff4` N/A N/A N/A N/A MySQLdb Error N/A N/A N/A N/A logging debug Recreating Tables N/A N/A N/A self RecreateTables N/A DropTables N/A N/A self N/A N/A N/A Drop all existing tables. N/A rows N/A N/A self ExecuteQuery N/A SELECT table_name FROM information_schema.tables WHERE table_schema='%s' N/A self database_name N/A row rows N/A N/A N/A N/A self ExecuteQuery N/A DROP TABLE `%s` N/A row N/A table_name N/A RecreateTables N/A N/A self N/A N/A N/A Drops the tables and creates a new ones. N/A N/A N/A self DropTables N/A N/A N/A self _CreateTables N/A Transaction N/A N/A self subject lease_time token N/A None None N/A N/A N/A MySQLTransaction self subject lease_time lease_time token token N/A Size N/A N/A self N/A N/A N/A query N/A SELECT table_schema, Sum(data_length + index_length) `size` FROM information_schema.tables WHERE table_schema = "%s" GROUP by table_schema N/A self database_name N/A result N/A N/A self ExecuteQuery query N/A N/A N/A N/A len result 1 N/A N/A -1 N/A N/A int N/A N/A result N/A 0 N/A size N/A DeleteAttributes N/A N/A self subject attributes start end sync token N/A None None True None N/A N/A Remove some attributes from a subject. N/A _ sync N/A N/A N/A N/A self security_manager CheckDataStoreAccess token N/A subject w N/A N/A attributes N/A N/A N/A N/A isinstance attributes basestring N/A N/A N/A ValueError String passed to DeleteAttributes (non string iterable expected). N/A attribute attributes N/A N/A timestamp N/A N/A self _MakeTimestamp start end N/A attribute N/A N/A utils SmartUnicode attribute N/A queries N/A N/A self _BuildDelete subject attribute timestamp N/A N/A N/A self _ExecuteQueries queries N/A DeleteSubject N/A N/A self subject sync token N/A False None N/A N/A _ sync N/A N/A N/A N/A self security_manager CheckDataStoreAccess token N/A subject w N/A queries N/A N/A self _BuildDelete subject N/A N/A N/A self _ExecuteQueries queries N/A ResolveMulti N/A N/A self subject attributes timestamp limit token N/A None None None N/A N/A Resolves multiple attributes at once for one subject. N/A N/A N/A N/A self security_manager CheckDataStoreAccess token N/A subject N/A N/A self GetRequiredResolveAccess attributes N/A attribute attributes N/A N/A N/A query args N/A N/A self _BuildQuery subject attribute timestamp limit N/A result N/A N/A self ExecuteQuery query args N/A row result N/A N/A value N/A N/A self _Decode attribute N/A row N/A value N/A N/A N/A attribute value N/A row N/A timestamp N/A limit N/A N/A limit N/A len result N/A N/A N/A limit None N/A limit 0 N/A N/A N/A MultiResolvePrefix N/A N/A self subjects attribute_prefix timestamp limit token N/A None None None N/A N/A Result multiple subjects using one or more attribute regexps. N/A result N/A N/A subject subjects N/A N/A values N/A N/A self ResolvePrefix subject attribute_prefix token token timestamp timestamp limit limit N/A values N/A N/A N/A result N/A subject values N/A limit N/A N/A limit N/A len values N/A N/A N/A limit None N/A limit 0 N/A N/A N/A N/A N/A result iteritems N/A ResolvePrefix N/A N/A self subject attribute_prefix timestamp limit token N/A None None None N/A N/A ResolvePrefix. N/A N/A N/A N/A self security_manager CheckDataStoreAccess token N/A subject N/A N/A self GetRequiredResolveAccess attribute_prefix N/A N/A isinstance attribute_prefix basestring N/A N/A attribute_prefix N/A attribute_prefix N/A results N/A N/A prefix attribute_prefix N/A N/A N/A query args N/A N/A self _BuildQuery subject prefix timestamp limit is_prefix True N/A rows N/A N/A self ExecuteQuery query args N/A row rows N/A N/A attribute N/A row N/A attribute N/A value N/A N/A self _Decode attribute N/A row N/A value N/A N/A N/A results append N/A attribute value N/A row N/A timestamp N/A results N/A _ScanAttribute N/A N/A self subject_prefix attribute after_urn limit token N/A None None None N/A N/A N/A N/A N/A self security_manager CheckDataStoreAccess token N/A subject_prefix qr N/A subject_prefix N/A N/A utils SmartStr N/A N/A rdfvalue RDFURN subject_prefix N/A N/A N/A subject_prefix N/A -1 / N/A N/A subject_prefix / N/A subject_prefix % N/A query 
    SELECT aff4.value, aff4.timestamp, subjects.subject
      FROM aff4
      JOIN subjects ON aff4.subject_hash=subjects.hash
      JOIN (
            SELECT subject_hash, MAX(timestamp) timestamp
            FROM aff4
            JOIN subjects ON aff4.subject_hash=subjects.hash
            WHERE aff4.attribute_hash=unhex(md5(%s))
                  AND subjects.subject like %s
                  AND subjects.subject > %s
            GROUP BY subject_hash
            ) maxtime ON aff4.subject_hash=maxtime.subject_hash
                  AND aff4.timestamp=maxtime.timestamp
      WHERE aff4.attribute_hash=unhex(md5(%s))
     N/A args N/A attribute subject_prefix after_urn attribute N/A limit N/A N/A query  LIMIT %s N/A N/A N/A args append limit N/A results N/A N/A self ExecuteQuery query args N/A results N/A ScanAttributes N/A N/A self subject_prefix attributes after_urn max_records token relaxed_order N/A None None None False N/A N/A _ relaxed_order N/A after_urn N/A N/A after_urn N/A N/A utils SmartStr after_urn N/A N/A after_urn N/A results N/A N/A attribute attributes N/A N/A attribute_results N/A N/A self _ScanAttribute subject_prefix attribute after_urn max_records token N/A row attribute_results N/A N/A subject N/A row N/A subject N/A timestamp N/A row N/A timestamp N/A value N/A N/A self _Decode attribute N/A row N/A value N/A N/A subject results N/A N/A N/A N/A results N/A subject N/A attribute N/A timestamp value N/A N/A N/A results N/A subject N/A attribute N/A timestamp value N/A result_count 0 N/A subject N/A sorted results N/A N/A N/A N/A subject N/A results N/A subject N/A result_count 1 N/A N/A max_records N/A result_count max_records N/A N/A N/A MultiSet N/A N/A self subject values timestamp replace sync to_delete token N/A None True True None None N/A N/A Set multiple attributes' values for this subject in one operation. N/A N/A N/A N/A self security_manager CheckDataStoreAccess token N/A subject w N/A to_delete N/A set N/A to_delete N/A N/A subject N/A N/A utils SmartUnicode subject N/A to_insert N/A N/A to_replace N/A N/A transaction N/A N/A N/A attribute sequence N/A N/A values items N/A N/A value sequence N/A N/A N/A isinstance value tuple N/A N/A N/A value entry_timestamp value N/A N/A entry_timestamp timestamp N/A N/A entry_timestamp None N/A N/A entry_timestamp timestamp N/A N/A entry_timestamp None N/A N/A entry_timestamp N/A int entry_timestamp N/A attribute N/A N/A utils SmartUnicode attribute N/A data N/A N/A self _Encode value N/A N/A replace N/A attribute to_delete N/A N/A existing N/A N/A self _CountExistingRows subject attribute N/A existing N/A N/A N/A N/A to_replace append N/A subject attribute data entry_timestamp N/A N/A N/A N/A to_insert append N/A subject attribute data entry_timestamp N/A N/A attribute to_delete N/A N/A N/A N/A to_delete remove attribute N/A N/A N/A N/A to_insert append N/A subject attribute data entry_timestamp N/A to_delete N/A N/A N/A N/A self DeleteAttributes subject to_delete token token N/A sync N/A N/A to_replace N/A N/A N/A N/A transaction extend N/A N/A self _BuildReplaces to_replace N/A to_insert N/A N/A N/A N/A transaction extend N/A N/A self _BuildInserts to_insert N/A transaction N/A N/A N/A N/A self _ExecuteTransaction transaction N/A N/A to_replace N/A N/A N/A self buffer_lock N/A N/A N/A N/A N/A self to_replace extend to_replace N/A to_insert N/A N/A N/A self buffer_lock N/A N/A N/A N/A N/A self to_insert extend to_insert N/A _CountExistingRows N/A N/A self subject attribute N/A N/A N/A query SELECT count(*) AS total FROM aff4 WHERE subject_hash=unhex(md5(%s)) AND attribute_hash=unhex(md5(%s)) N/A args N/A subject attribute N/A result N/A N/A self ExecuteQuery query args N/A N/A int N/A N/A result N/A 0 N/A total N/A Flush N/A N/A self N/A N/A N/A N/A N/A N/A super MySQLAdvancedDataStore self Flush N/A N/A self buffer_lock N/A N/A to_insert N/A self to_insert N/A to_replace N/A self to_replace N/A N/A self to_replace N/A N/A N/A self to_insert N/A N/A transaction N/A N/A to_replace N/A N/A N/A N/A transaction extend N/A N/A self _BuildReplaces to_replace N/A to_insert N/A N/A N/A N/A transaction extend N/A N/A self _BuildInserts to_insert N/A transaction N/A N/A N/A N/A self _ExecuteTransaction transaction N/A N/A utils Synchronized _BuildReplaces N/A N/A self values N/A N/A N/A transaction N/A N/A updates N/A N/A to_insert N/A N/A N/A subject attribute data timestamp values N/A N/A N/A N/A N/A updates setdefault subject N/A N/A attribute N/A data timestamp N/A subject updates N/A N/A attribute N/A updates N/A subject N/A N/A data N/A N/A N/A updates N/A subject N/A attribute N/A 0 N/A timestamp N/A N/A N/A updates N/A subject N/A attribute N/A 1 N/A N/A N/A to_insert append N/A subject attribute data timestamp N/A delete_q N/A N/A N/A self _BuildDelete subject attribute N/A 0 N/A N/A N/A transaction append delete_q N/A N/A N/A transaction extend N/A N/A self _BuildInserts to_insert N/A transaction N/A _BuildInserts N/A N/A self values N/A N/A N/A subjects_q N/A N/A attributes_q N/A N/A aff4_q N/A N/A N/A subjects_q N/A query INSERT IGNORE INTO subjects (hash, subject) VALUES N/A N/A attributes_q N/A query INSERT IGNORE INTO attributes (hash, attribute) VALUES N/A N/A aff4_q N/A query INSERT INTO aff4 (subject_hash, attribute_hash, timestamp, value) VALUES N/A N/A subjects_q N/A args N/A N/A N/A attributes_q N/A args N/A N/A N/A aff4_q N/A args N/A N/A seen N/A N/A N/A seen N/A subjects N/A N/A N/A seen N/A attributes N/A N/A N/A subject attribute value timestamp values N/A N/A N/A subject N/A seen N/A subjects N/A N/A N/A N/A N/A subjects_q N/A args extend N/A subject subject N/A N/A N/A N/A seen N/A subjects append subject N/A N/A attribute N/A seen N/A attributes N/A N/A N/A N/A N/A attributes_q N/A args extend N/A attribute attribute N/A N/A N/A N/A seen N/A attributes append attribute N/A N/A N/A N/A aff4_q N/A args extend N/A subject attribute timestamp timestamp value N/A N/A subjects_q N/A query N/A N/A ,  join N/A N/A (unhex(md5(%s)), %s) N/A N/A len N/A subjects_q N/A args 2 N/A N/A attributes_q N/A query N/A N/A ,  join N/A N/A (unhex(md5(%s)), %s) N/A N/A len N/A attributes_q N/A args 2 N/A N/A aff4_q N/A query N/A N/A ,  join N/A N/A (unhex(md5(%s)), unhex(md5(%s)), if(%s is NULL,floor(unix_timestamp(now(6))*1000000),%s), unhex(%s)) N/A N/A len N/A aff4_q N/A args 5 N/A N/A aff4_q attributes_q subjects_q N/A ExecuteQuery N/A N/A self query args N/A None N/A N/A Get connection from pool and execute query. N/A True N/A N/A connection N/A N/A N/A self pool GetConnection N/A N/A N/A N/A N/A N/A N/A N/A connection cursor execute query args N/A results N/A N/A N/A connection cursor fetchall N/A N/A N/A N/A self pool PutConnection connection N/A results N/A N/A N/A N/A MySQLdb Error N/A e N/A N/A N/A N/A N/A self pool DropConnection connection N/A N/A doesn't exist N/A str e N/A N/A e N/A N/A N/A N/A logging warning Datastore query retrying after failed with %s. N/A str e N/A N/A N/A time sleep 1 N/A N/A N/A N/A N/A N/A self pool connections task_done N/A _ExecuteQueries N/A N/A self queries N/A N/A N/A Get connection from pool and execute queries. N/A query queries N/A N/A N/A N/A self ExecuteQuery N/A query N/A query N/A query N/A args N/A _ExecuteTransaction N/A N/A self transaction N/A N/A N/A Get connection from pool and execute transaction. N/A True N/A N/A connection N/A N/A N/A self pool GetConnection N/A N/A N/A N/A N/A N/A N/A N/A connection cursor execute START TRANSACTION N/A query transaction N/A N/A N/A N/A N/A connection cursor execute N/A query N/A query N/A query N/A args N/A N/A N/A N/A connection cursor execute COMMIT N/A results N/A N/A N/A connection cursor fetchall N/A N/A N/A N/A self pool PutConnection connection N/A results N/A N/A N/A N/A MySQLdb Error N/A e N/A N/A N/A N/A N/A self pool DropConnection connection N/A N/A doesn't exist N/A str e N/A N/A e N/A N/A N/A N/A logging warning Datastore query retrying after failed with %s. N/A str e N/A N/A N/A time sleep 1 N/A N/A N/A N/A N/A N/A self pool connections task_done N/A _CalculateAttributeStorageTypes N/A N/A self N/A N/A N/A Build a mapping between column names and types. N/A N/A self attribute_types N/A N/A attribute N/A N/A N/A N/A aff4 Attribute PREDICATES values N/A N/A N/A N/A self attribute_types N/A N/A attribute predicate N/A N/A attribute attribute_type data_store_type N/A _Encode N/A N/A self value N/A N/A N/A Encode the value for the attribute. N/A N/A N/A N/A N/A N/A N/A value SerializeToString encode hex N/A N/A N/A AttributeError N/A N/A N/A isinstance value N/A int long N/A N/A N/A N/A N/A str value encode hex N/A N/A N/A N/A N/A N/A utils SmartStr value encode hex N/A _Decode N/A N/A self attribute value N/A N/A N/A required_type N/A N/A N/A self attribute_types get attribute bytes N/A N/A isinstance value buffer N/A N/A value N/A str value N/A N/A required_type N/A integer unsigned_integer N/A N/A N/A int value N/A N/A N/A required_type string N/A N/A N/A N/A utils SmartUnicode value N/A N/A value N/A _BuildQuery N/A N/A self subject attribute timestamp limit is_prefix N/A None None None False N/A N/A Build the SELECT query to be executed. N/A args N/A N/A subject N/A N/A utils SmartUnicode subject N/A criteria WHERE aff4.subject_hash=unhex(md5(%s)) N/A N/A N/A args append subject N/A sorting N/A tables FROM aff4 N/A N/A attribute None N/A N/A is_prefix N/A N/A tables  JOIN attributes ON aff4.attribute_hash=attributes.hash N/A prefix N/A attribute % N/A criteria  AND attributes.attribute like %s N/A N/A N/A args append prefix N/A N/A criteria  AND aff4.attribute_hash=unhex(md5(%s)) N/A N/A N/A args append attribute N/A N/A isinstance timestamp N/A tuple list N/A N/A criteria  AND aff4.timestamp >= %s AND aff4.timestamp <= %s N/A N/A N/A args append N/A int N/A timestamp N/A 0 N/A N/A N/A args append N/A int N/A timestamp N/A 1 N/A fields aff4.value, aff4.timestamp N/A is_prefix N/A N/A fields , attributes.attribute N/A N/A N/A timestamp None N/A timestamp N/A self NEWEST_TIMESTAMP N/A N/A tables N/A  JOIN (SELECT attribute_hash, MAX(timestamp) timestamp %s %s GROUP BY attribute_hash) maxtime ON aff4.attribute_hash=maxtime.attribute_hash AND aff4.timestamp=maxtime.timestamp N/A tables criteria N/A criteria WHERE aff4.subject_hash=unhex(md5(%s)) N/A N/A N/A args append subject N/A N/A sorting ORDER BY aff4.timestamp DESC N/A limit N/A N/A sorting N/A  LIMIT %s N/A int limit N/A query N/A N/A join N/A SELECT fields tables criteria sorting N/A N/A query args N/A _BuildDelete N/A N/A self subject attribute timestamp N/A None None N/A N/A Build the DELETE query to be executed. N/A subjects_q N/A query args DELETE subjects FROM subjects WHERE hash=unhex(md5(%s)) N/A subject N/A aff4_q N/A query args DELETE aff4 FROM aff4 WHERE subject_hash=unhex(md5(%s)) N/A subject N/A locks_q N/A query args DELETE locks FROM locks WHERE subject_hash=unhex(md5(%s)) N/A subject N/A attribute N/A N/A N/A aff4_q N/A query  AND attribute_hash=unhex(md5(%s)) N/A N/A N/A N/A aff4_q N/A args append attribute N/A N/A isinstance timestamp N/A tuple list N/A N/A N/A aff4_q N/A query  AND aff4.timestamp >= %s AND aff4.timestamp <= %s N/A N/A N/A N/A aff4_q N/A args append N/A int N/A timestamp N/A 0 N/A N/A N/A N/A aff4_q N/A args append N/A int N/A timestamp N/A 1 N/A attributes_q N/A query args DELETE attributes FROM attributes LEFT JOIN aff4 ON aff4.attribute_hash=attributes.hash WHERE attributes.hash=unhex(md5(%s)) AND aff4.attribute_hash IS NULL N/A attribute N/A N/A aff4_q attributes_q N/A N/A aff4_q locks_q subjects_q N/A _MakeTimestamp N/A N/A self start end N/A None None N/A N/A Create a timestamp using a start and end time.

    Args:
      start: Start timestamp.
      end: End timestamp.
    Returns:
      A tuple (start, end) of converted timestamps or None for all time.
     N/A mysql_unsigned_bigint_max 18446744073709551615 N/A ts_start N/A int N/A start 0 N/A N/A end None N/A N/A ts_end mysql_unsigned_bigint_max N/A N/A ts_end N/A int end N/A N/A N/A ts_start 0 N/A ts_end mysql_unsigned_bigint_max N/A N/A None N/A N/A N/A ts_start ts_end N/A _CreateTables N/A N/A self N/A N/A N/A N/A N/A self ExecuteQuery 
    CREATE TABLE IF NOT EXISTS `subjects` (
      hash BINARY(16) PRIMARY KEY NOT NULL,
      subject TEXT CHARACTER SET utf8 NULL,
      KEY `subject` (`subject`(96))
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT ='Table for storing subjects';
     N/A N/A N/A self ExecuteQuery 
    CREATE TABLE IF NOT EXISTS `attributes` (
      hash BINARY(16) PRIMARY KEY NOT NULL,
      attribute VARCHAR(2048) CHARACTER SET utf8 DEFAULT NULL,
      KEY `attribute` (`attribute`(32))
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT ='Table storing attributes';
     N/A N/A N/A self ExecuteQuery 
    CREATE TABLE IF NOT EXISTS `aff4` (
      id BIGINT UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT,
      subject_hash BINARY(16) NOT NULL,
      attribute_hash BINARY(16) NOT NULL,
      timestamp BIGINT UNSIGNED DEFAULT NULL,
      value MEDIUMBLOB NULL,
      KEY `master` (`subject_hash`,`attribute_hash`,`timestamp`),
      KEY `attribute` (`attribute_hash`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8
    COMMENT ='Table representing AFF4 objects';
     N/A N/A N/A self ExecuteQuery 
    CREATE TABLE IF NOT EXISTS `locks` (
      subject_hash BINARY(16) PRIMARY KEY NOT NULL,
      lock_owner BIGINT UNSIGNED DEFAULT NULL,
      lock_expiration BIGINT UNSIGNED DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8
    COMMENT ='Table representing locks on subjects';
     N/A N/A MySQLTransaction N/A N/A data_store CommonTransaction N/A N/A The Mysql data store transaction object.

  This object does not aim to ensure ACID like consistently. We only ensure that
  two simultaneous locks can not be held on the same AFF4 subject.

  This means that the first thread which grabs the lock is considered the owner
  of the transaction. Any subsequent transactions on the same subject will fail
  immediately with data_store.TransactionError.

  A lock is considered expired after a certain time.
   __init__ N/A N/A self store subject lease_time token N/A None None N/A N/A Ensure we can take a lock on this subject. N/A N/A N/A N/A super MySQLTransaction self __init__ store subject lease_time lease_time token token N/A N/A lease_time None N/A N/A lease_time N/A N/A config_lib CONFIG N/A Datastore.transaction_timeout N/A N/A self lock_token N/A N/A thread get_ident N/A N/A self lock_time lease_time N/A N/A self expires_lock N/A int N/A N/A N/A N/A time time N/A self lock_time 1000000.0 N/A query UPDATE locks SET lock_expiration=%s, lock_owner=%s WHERE subject_hash=unhex(md5(%s)) AND (lock_expiration < %s) N/A args N/A N/A self expires_lock N/A self lock_token subject N/A N/A N/A time time 1000000.0 N/A N/A N/A N/A self store ExecuteQuery query args N/A N/A N/A self _CheckForLock N/A UpdateLease N/A N/A self lease_time N/A N/A N/A N/A self expires_lock N/A int N/A N/A N/A N/A time time lease_time 1000000.0 N/A query UPDATE locks SET lock_expiration=%s, lock_owner=%s WHERE subject_hash=unhex(md5(%s)) N/A args N/A N/A self expires_lock N/A self lock_token N/A self subject N/A N/A N/A N/A self store ExecuteQuery query args N/A CheckLease N/A N/A self N/A N/A N/A N/A max 0 N/A N/A N/A self expires_lock 1000000.0 N/A N/A time time N/A Abort N/A N/A self N/A N/A N/A N/A N/A self _RemoveLock N/A Commit N/A N/A self N/A N/A N/A N/A N/A N/A super MySQLTransaction self Commit N/A N/A N/A self _RemoveLock N/A _CheckForLock N/A N/A self N/A N/A N/A Checks that the lock has stuck. N/A query SELECT lock_expiration, lock_owner FROM locks WHERE subject_hash=unhex(md5(%s)) N/A args N/A N/A self subject N/A rows N/A N/A N/A self store ExecuteQuery query args N/A row rows N/A N/A N/A N/A N/A row N/A lock_expiration N/A self expires_lock N/A N/A row N/A lock_owner N/A self lock_token N/A N/A N/A N/A N/A N/A data_store TransactionError N/A Subject %s is locked N/A self subject N/A query INSERT IGNORE INTO locks SET lock_expiration=%s, lock_owner=%s, subject_hash=unhex(md5(%s)) N/A args N/A N/A self expires_lock N/A self lock_token N/A self subject N/A N/A N/A N/A self store ExecuteQuery query args N/A N/A N/A self _CheckForLock N/A _RemoveLock N/A N/A self N/A N/A N/A query UPDATE locks SET lock_expiration=0, lock_owner=0 WHERE lock_expiration=%s AND lock_owner=%s AND subject_hash=unhex(md5(%s)) N/A args N/A N/A self expires_lock N/A self lock_token N/A self subject N/A N/A N/A N/A self store ExecuteQuery query args N/A N/A