On 04/10/2012 09:46 AM, Jakub Filak wrote:
---
  src/plugins/abrt-action-analyze-vmcore.in    |    7 +++++--
  src/plugins/abrt-action-install-debuginfo.in |    2 ++
  2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/plugins/abrt-action-analyze-vmcore.in 
b/src/plugins/abrt-action-analyze-vmcore.in
index af606c4..2e02167 100644
--- a/src/plugins/abrt-action-analyze-vmcore.in
+++ b/src/plugins/abrt-action-analyze-vmcore.in
@@ -25,7 +25,7 @@ if __name__ == "__main__":
      vmlinux_di_path = ""
      tmpdir = ""
      vmcore = ""
-    global verbose
+
      help_text = _("Usage: {0} [-v[v]] [--core=VMCORE] [--tmpdir=TMPDIR] 
[--cache=CACHEDIR]").format(PROGNAME)
      try:
          opts, args = getopt.getopt(sys.argv[1:], "hvd", ["help", "tmpdir=", "cache=", 
"core="])
@@ -114,7 +114,10 @@ if __name__ == "__main__":
                  error_msg_and_die(_("Can't download required debuginfo"))
              vmlinux_di_path = 
"{0}/usr/lib/debug/lib/modules/{1}/vmlinux".format(vmlinux_di_cachedir, ver)
          else: # we need to use the suid wrapper, if we use the default cache
-            downloader = Popen(["/usr/libexec/abrt-action-install-debuginfo-to-abrt-cache", 
"--size_mb=4096", "--exact={0}".format(vmlinux_di_path)], bufsize = -1)
+            downloader_args = ["/usr/libexec/abrt-action-install-debuginfo-to-abrt-cache", 
"--size_mb=4096", "--exact={0}".format(vmlinux_di_path)]
+            if 0<  verbose:

- please write the condition as if verbose > 0:

+                downloader_args.append( "-{0}".format( "v"*verbose ) )

- coding style: we don't write space after the first and before the last bracket when calling function

+            downloader = Popen( downloader_args, bufsize = -1)

- ^ same here

              res = downloader.wait()
              if res != 0:
                  error_msg_and_die(_("Can't download required debuginfo"))
diff --git a/src/plugins/abrt-action-install-debuginfo.in 
b/src/plugins/abrt-action-install-debuginfo.in
index a6c39f3..a50d29b 100644
--- a/src/plugins/abrt-action-install-debuginfo.in
+++ b/src/plugins/abrt-action-install-debuginfo.in
@@ -134,6 +134,8 @@ if __name__ == "__main__":
              missing=arg.split(':')
              exact_fls = True

+    set_verbosity( verbose )
+

- and here

      if not cachedirs:
          try:
              fp = open("@sysconfdir@/@PACKAGE_NAME@/plugins/CCpp.conf", "r")

- otherwise looks ok

Reply via email to