(self)
Initialize a ISBG object.
Initialize a ISBG object.
Initialize a ISBG object .
def __init__(self):
        """Initialize a ISBG object."""
        self.imapsets = imaputils.ImapSettings()
        self.imap = None

        self.logger = logging.getLogger(__name__)       #: a logger
        self.logger.addHandler(logging.StreamHandler())

        # We create the dir for store cached information (if needed)
        if not os.path.isdir(os.path.join(xdg_cache_home, "isbg")):
            os.makedirs(os.path.join(xdg_cache_home, "isbg"))

        self.imaplist, self.nostats = (False, False)
        self.noreport, self.exitcodes = (False, True)
        self.verbose_mails, self._verbose = (False, False)
        self._set_loglevel(logging.INFO)
        # Processing options:
        self.dryrun, self.maxsize, self.teachonly = (False, 120000, False)
        self.spamc, self.gmail = (False, False)
        # spamassassin options:
        self.movehamto, self.delete = (None, False)
        self.deletehigherthan, self.flag, self.expunge = (None, False, False)
        # Learning options:
        self.learnflagged, self.learnunflagged = (False, False)
        self.learnthendestroy, self.learnthenflag = (False, False)
        # Lockfile options:
        self.ignorelockfile = False
        self.lockfilename = os.path.join(xdg_cache_home, "isbg", "lock")
        self.lockfilegrace = 240.0
        # Password options (a vague level of obfuscation):
        self.passwdfilename, self.savepw = (None, False)
        # Trackfile options:
        self.trackfile, self.partialrun = (None, 50)

        try:
            self.interactive = sys.stdin.isatty()
        except AttributeError:
            self.logger.warning("Can't get info about if stdin is a tty")
            self.interactive = False

        # what we use to set flags on the original spam in imapbox
        self.spamflagscmd = "+FLAGS.SILENT"
        # and the flags we set them to (none by default)
        self.spamflags = []
def __init__ ( self ) : self . imapsets = imaputils . ImapSettings ( ) self . imap = None self . logger = logging . getLogger ( __name__ ) #: a logger self . logger . addHandler ( logging . StreamHandler ( ) ) # We create the dir for store cached information (if needed) if not os . path . isdir ( os . path . join ( xdg_cache_home , "isbg" ) ) : os . makedirs ( os . path . join ( xdg_cache_home , "isbg" ) ) self . imaplist , self . nostats = ( False , False ) self . noreport , self . exitcodes = ( False , True ) self . verbose_mails , self . _verbose = ( False , False ) self . _set_loglevel ( logging . INFO ) # Processing options: self . dryrun , self . maxsize , self . teachonly = ( False , 120000 , False ) self . spamc , self . gmail = ( False , False ) # spamassassin options: self . movehamto , self . delete = ( None , False ) self . deletehigherthan , self . flag , self . expunge = ( None , False , False ) # Learning options: self . learnflagged , self . learnunflagged = ( False , False ) self . learnthendestroy , self . learnthenflag = ( False , False ) # Lockfile options: self . ignorelockfile = False self . lockfilename = os . path . join ( xdg_cache_home , "isbg" , "lock" ) self . lockfilegrace = 240.0 # Password options (a vague level of obfuscation): self . passwdfilename , self . savepw = ( None , False ) # Trackfile options: self . trackfile , self . partialrun = ( None , 50 ) try : self . interactive = sys . stdin . isatty ( ) except AttributeError : self . logger . warning ( "Can't get info about if stdin is a tty" ) self . interactive = False # what we use to set flags on the original spam in imapbox self . spamflagscmd = "+FLAGS.SILENT" # and the flags we set them to (none by default) self . spamflags = [ ]