File: //lib/python3.6/site-packages/supervisor/__pycache__/supervisorctl.cpython-36.opt-1.pyc
3
�k�`�� � @ sn d Z ddlZddlZddlZddlZddlZddlZddlmZ ddlm Z ddlm
Z
ddlmZ ddlmZ ddl
mZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZ G dd� d�ZG dd� d�ZejjejjejjfZG dd� dej�Z G dd� dej!�Z"dd� Z#G dd� d�Z$dd� Z%dd� Z&G dd � d e$�Z'd$d!d"�Z(e)d#k�rje(� dS )%a� supervisorctl -- control applications run by supervisord from the cmd line.
Usage: %s [options] [action [arguments]]
Options:
-c/--configuration FILENAME -- configuration file path (searches if not given)
-h/--help -- print usage message and exit
-i/--interactive -- start an interactive shell after executing commands
-s/--serverurl URL -- URL on which supervisord server is listening
(default "http://localhost:9001").
-u/--username USERNAME -- username to use for authentication with server
-p/--password PASSWORD -- password to use for authentication with server
-r/--history-file -- keep a readline history (if readline is available)
action [arguments] -- see below
Actions are commands like "tail" or "stop". If -i is specified or no action is
specified on the command line, a "shell" interpreting actions typed
interactively is started. Use the action "help" to find out about available
actions.
� N)� xmlrpclib)�urlparse)�unicode)� raw_input)� as_string)�asyncore_25)�
ClientOptions)�
make_namespec)�split_namespec)�xmlrpc)�states)�http_clientc @ s( e Zd ZdZdZdZdZdZdZdZ dS ) �LSBInitExitStatusesr � � � � � � N)
�__name__�
__module__�__qualname__�SUCCESS�GENERIC�INVALID_ARGS�UNIMPLEMENTED_FEATURE�INSUFFICIENT_PRIVILEGES�
NOT_INSTALLED�NOT_RUNNING� r r �#/usr/lib/python3.6/supervisorctl.pyr / s r c @ s e Zd ZdZdZdS )�LSBStatusExitStatusesr r N)r r r r �UNKNOWNr r r r r! 8 s r! c @ sH e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dS )�fgthreadz� A subclass of threading.Thread, with a kill() method.
To be used for foreground output/error streaming.
http://mail.python.org/pipermail/python-list/2004-May/260937.html
c C sh t jj| � d| _|| _|| _tj� | _tj | j| jj
j| jj
j�| _
tj | j| jj
j| jj
j�| _d S )NF)� threading�Thread�__init__�killed�program�ctlr
�Listener�listener�HTTPHandler�options�username�password�output_handler�
error_handler)�selfr( r) r r r r&