Changeset 82

Show
Ignore:
Timestamp:
07/07/06 16:11:05 (2 years ago)
Author:
mk
Message:

Implemented --lite command line flag (closes ticket #38).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/mk/cheesecake/cheesecake_index.py

    r81 r82  
    885885        return self.value 
    886886 
     887    def decide_before_download(self, cheesecake): 
     888        return not cheesecake.lite 
     889 
    887890class IndexCodeKwalitee(Index): 
    888891    name = "CODE KWALITEE" 
     
    968971 
    969972    def __init__(self, name="", url="", path="", sandbox=None, config=None, 
    970                 logfile=None, verbose=False, quiet=False, static_only=False): 
     973                 logfile=None, verbose=False, quiet=False, static_only=False, 
     974                 lite=False): 
    971975        """Initialize critical variables, download and unpack package, 
    972976        walk package tree. 
     
    994998        self.quiet = quiet 
    995999        self.static_only = static_only 
     1000        self.lite = lite 
    9961001 
    9971002        self.sandbox_pkg_file = "" 
     
    14101415                      default=None, 
    14111416                      help="directory with custom configuration (default=~/.cheesecake)") 
     1417    parser.add_option("--lite", action="store_true", dest="lite", 
     1418                      default=False, help="don't run time-consuming tests (default=False)") 
    14121419    parser.add_option("-l", "--logfile", dest="logfile", 
    14131420                      default=None, 
     
    14461453    quiet = options.quiet 
    14471454    static_only = options.static 
     1455    lite = options.lite 
    14481456 
    14491457    if not name and not url and not path: 
     
    14541462        c = Cheesecake(name=name, url=url, path=path, sandbox=sandbox, 
    14551463                       config=config, logfile=logfile, verbose=verbose, 
    1456                        quiet=quiet, static_only=static_only
     1464                       quiet=quiet, static_only=static_only, lite=lite
    14571465        c.compute_cheesecake_index() 
    14581466        c.cleanup()