Codebase list python-pauvre / 76d4bed debian / patches / fix-kwargs.patch
76d4bed

Tree @76d4bed (Download .tar.gz)

fix-kwargs.patch @76d4bedraw · history · blame

Description: fixed a small error with kwargs 
 cherry picked from upstream, fixes a crash when running the provided test
 suite:
  plotting in the following window:
          0 <= Q-score (x-axis) <= 14.0
          0 <= length  (y-axis) <= 223383
 .
  Traceback (most recent call last):
    File "/usr/bin/pauvre", line 11, in <module>
      load_entry_point('pauvre==0.1924', 'console_scripts', 'pauvre')()
    File "/usr/lib/python3/dist-packages/pauvre/pauvre_main.py", line 630, in main
      args.func(parser, args)
    File "/usr/lib/python3/dist-packages/pauvre/pauvre_main.py", line 64, in run_subtool
      submodule.run(args)
    File "/usr/lib/python3/dist-packages/pauvre/marginplot.py", line 403, in run
      margin_plot(df=df.dropna(), **vars(args))
    File "/usr/lib/python3/dist-packages/pauvre/marginplot.py", line 381, in margin_plot
      if kwargs["BASENAME"] is None and not kwargs["path"] is None:
  KeyError: 'path'
Origin: upstream, https://github.com/conchoecia/pauvre/commit/90fbe2f4c190ff897dfc8ae12971d5865682fc8a
Forwarded: https://github.com/conchoecia/pauvre/commit/90fbe2f4c190ff897dfc8ae12971d5865682fc8a
Applied-Upstream: https://github.com/conchoecia/pauvre/commit/90fbe2f4c190ff897dfc8ae12971d5865682fc8a
Last-Update: 2020-04-28
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- python-pauvre.orig/pauvre/marginplot.py
+++ python-pauvre/pauvre/marginplot.py
@@ -378,9 +378,7 @@
             min_plot_qual, max_plot_qual, min_plot_length, max_plot_length),
             file=stderr)
     # Print image(s)
-    if kwargs["BASENAME"] is None and not kwargs["path"] is None:
-        file_base = kwargs["BASENAME"]
-    elif kwargs["BASENAME"] is None:
+    if kwargs["BASENAME"] is None:
         file_base = opath.splitext(opath.basename(kwargs["fastq"]))[0]
     else:
         file_base = kwargs["BASENAME"]