From 1180182bfe51ecf772b34b90a4b790869d817f93 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Fri, 24 Sep 2010 17:48:34 +0200 Subject: Fit onto 80 characters --- whatmaps | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'whatmaps') diff --git a/whatmaps b/whatmaps index 1d23597..d824a2c 100755 --- a/whatmaps +++ b/whatmaps @@ -250,7 +250,8 @@ class DebianDistro(Distro): if pkg.version == cache_version.ver_str: for pfile, _ in cache_version.file_list: for origin in security_update_origins: - if pfile.origin == origin[0] and pfile.archive == origin[1]: + if pfile.origin == origin[0] and \ + pfile.archive == origin[1]: security_updates[pkg] = pkg break return security_updates @@ -294,7 +295,8 @@ class DebianPkg(Pkg): class RedHatDistro(Distro): "RPM based distribution""" - _pkg_re = re.compile(r'(?P[\w\-\+]+)-(?P[\w\.]+)-(?P[\w\.]+)\.(?P.+)') + _pkg_re = re.compile(r'(?P[\w\-\+]+)-(?P[\w\.]+)' + '-(?P[\w\.]+)\.(?P.+)') @classmethod def pkg(klass, name): @@ -425,12 +427,12 @@ def main(argv): distro = detect_distro() parser = OptionParser(usage='%prog [options] pkg1 [pkg2 pkg3 pkg4]') - parser.add_option("--debug", action="store_true", dest="debug", default=False, - help="enable debug output") - parser.add_option("--verbose", action="store_true", dest="verbose", default=False, - help="enable verbose output") - parser.add_option("--restart", action="store_true", dest="restart", default=False, - help="Restart services") + parser.add_option("--debug", action="store_true", dest="debug", + default=False, help="enable debug output") + parser.add_option("--verbose", action="store_true", dest="verbose", + default=False, help="enable verbose output") + parser.add_option("--restart", action="store_true", dest="restart", + default=False, help="Restart services") parser.add_option("--print-cmds", dest="print_cmds", help="Output restart commands to file instead of restarting") parser.add_option("--apt", action="store_true", dest="apt", default=False, @@ -484,7 +486,8 @@ def main(argv): # Find processes that map them restart_procs = check_maps(get_all_pids(), shared_objects) logging.debug("Processes that map them:") - map(lambda (x, y): logging.debug(" Exe: %s Pids: %s", x, y), restart_procs.items()) + map(lambda (x, y): logging.debug(" Exe: %s Pids: %s", x, y), + restart_procs.items()) # Find packages that contain the binaries of these processes pkgs = {} -- cgit v1.2.3