]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/summary/__init__.py
Move a bunch of summary items to full class commands.
[wizard.git] / wizard / command / summary / __init__.py
index 7284f8c3faa977c299b1fc8f0c5f900ffdac7567..f47c61a782adfed0dbf3347997cc0b690c9df0df 100644 (file)
@@ -12,9 +12,6 @@ Scans all of the collected data from parallel-find.pl, and
 calculates interesting information about them.
 
 Its subcommands are:
-    count-exists    Counts how many autoinstalls contain a file
-    list            Prints the locations of all autoinstalls
-    list-errors     Prints all errors that occurred during parsing
     version         Breakdown of autoinstalls by version (default)
 
 Use %prog summary SUBCOMMAND --help for more information."""
@@ -46,40 +43,3 @@ Use %prog summary SUBCOMMAND --help for more information."""
         parser.error("invalid action")
     command_module.main(rest_argv, baton)
 
-## -- some generic helper stuff --
-
-def parse_install_lines(show, options, yield_errors = False):
-    if not show: show = deploy.applications()
-    show = frozenset(show)
-    for line in deploy.getInstallLines(options.versions_path):
-        # construction
-        try:
-            d = deploy.Deployment.parse(line)
-            name = d.application.name
-        except deploy.NoSuchApplication as e:
-            if yield_errors:
-                yield e
-            continue
-        except deploy.Error:
-            # we consider this a worse error
-            logging.warning("Error with '%s'" % line.rstrip())
-            continue
-        # filter
-        if name + "-" + str(d.version) in show or name in show:
-            pass
-        else:
-            continue
-        # yield
-        yield d
-
-class Counter(object):
-    def __init__(self):
-        self.dict = {}
-    def count(self, value):
-        self.dict.setdefault(value, 0)
-        self.dict[value] += 1
-    def __getitem__(self, key):
-        return self.dict[key]
-    def __iter__(self):
-        return self.dict.__iter__()
-