<s> import os <EOL> import sys <EOL> import logging <EOL> import traceback <EOL> version = "<STR_LIT>" <EOL> try : <EOL> import ConfigParser <EOL> _CONFIG_FILE = "<STR_LIT>" <EOL> _conf_file = os . path . dirname ( os . path . abspath ( __file__ ) ) + "<STR_LIT>" + _CONFIG_FILE <EOL> if not os . path . exists ( _conf_file ) : <EOL> _conf_file = os . path . join ( sys . prefix , _CONFIG_FILE ) <EOL> _config = ConfigParser . ConfigParser ( ) <EOL> _config . read ( _conf_file ) <EOL> default_dict = _config . defaults ( ) <EOL> logging_level = logging . FATAL <EOL> BIGJOB_VERBOSE = None <EOL> try : <EOL> BIGJOB_VERBOSE = int ( os . getenv ( '<STR_LIT>' ) ) <EOL> except Exception : <EOL> pass <EOL> if BIGJOB_VERBOSE == None : <EOL> level = default_dict [ "<STR_LIT>" ] <EOL> if level . startswith ( "<STR_LIT>" ) : <EOL> logging_level = eval ( level ) <EOL> else : <EOL> if BIGJOB_VERBOSE >= <NUM_LIT:4> : <EOL> print "<STR_LIT>" <EOL> logging_level = logging . DEBUG <EOL> elif BIGJOB_VERBOSE == <NUM_LIT:3> : <EOL> logging_level = logging . INFO <EOL> elif BIGJOB_VERBOSE == <NUM_LIT:2> : <EOL> logging_level = logging . WARNING <EOL> elif BIGJOB_VERBOSE == <NUM_LIT:1> : <EOL> logging_level = logging . ERROR <EOL> logging . basicConfig ( datefmt = '<STR_LIT>' , <EOL> format = '<STR_LIT>' ) <EOL> logger = logging . getLogger ( name = '<STR_LIT>' ) <EOL> logger . setLevel ( logging_level ) <EOL> paramiko_logger = logging . getLogger ( name = "<STR_LIT>" ) <EOL> paramiko_logger . setLevel ( logging . ERROR ) <EOL> except : <EOL> print ( "<STR_LIT>" ) <EOL> exc_type , exc_value , exc_traceback = sys . exc_info ( ) <EOL> traceback . print_exc ( limit = <NUM_LIT:1> , file = sys . stdout ) <EOL> import socket <EOL> try : <EOL> fn = os . path . join ( os . path . dirname ( os . path . abspath ( __file__ ) ) , "<STR_LIT:..>" , '<STR_LIT>' ) <EOL> if not os . path . exists ( fn ) : <EOL> fn = os . path . join ( sys . prefix , '<STR_LIT>' ) <EOL> version = open ( fn ) . read ( ) . strip ( ) <EOL> logger . info ( "<STR_LIT>" + version + "<STR_LIT>" + socket . gethostname ( ) ) <EOL> except IOError : <EOL> pass <EOL> from bigjob . bigjob_manager import bigjob <EOL> from bigjob . bigjob_manager import subjob <EOL> try : <EOL> from bigjob . bigjob_manager import description <EOL> except : <EOL> pass </s>
