upstream patch fix kwargs
Etienne Mollier
3 years ago
0 | Description: fixed a small error with kwargs | |
1 | cherry picked from upstream, fixes a crash when running the provided test | |
2 | suite: | |
3 | plotting in the following window: | |
4 | 0 <= Q-score (x-axis) <= 14.0 | |
5 | 0 <= length (y-axis) <= 223383 | |
6 | . | |
7 | Traceback (most recent call last): | |
8 | File "/usr/bin/pauvre", line 11, in <module> | |
9 | load_entry_point('pauvre==0.1924', 'console_scripts', 'pauvre')() | |
10 | File "/usr/lib/python3/dist-packages/pauvre/pauvre_main.py", line 630, in main | |
11 | args.func(parser, args) | |
12 | File "/usr/lib/python3/dist-packages/pauvre/pauvre_main.py", line 64, in run_subtool | |
13 | submodule.run(args) | |
14 | File "/usr/lib/python3/dist-packages/pauvre/marginplot.py", line 403, in run | |
15 | margin_plot(df=df.dropna(), **vars(args)) | |
16 | File "/usr/lib/python3/dist-packages/pauvre/marginplot.py", line 381, in margin_plot | |
17 | if kwargs["BASENAME"] is None and not kwargs["path"] is None: | |
18 | KeyError: 'path' | |
19 | Origin: upstream, https://github.com/conchoecia/pauvre/commit/90fbe2f4c190ff897dfc8ae12971d5865682fc8a | |
20 | Forwarded: https://github.com/conchoecia/pauvre/commit/90fbe2f4c190ff897dfc8ae12971d5865682fc8a | |
21 | Applied-Upstream: https://github.com/conchoecia/pauvre/commit/90fbe2f4c190ff897dfc8ae12971d5865682fc8a | |
22 | Last-Update: 2020-04-28 | |
23 | --- | |
24 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
25 | --- python-pauvre.orig/pauvre/marginplot.py | |
26 | +++ python-pauvre/pauvre/marginplot.py | |
27 | @@ -378,9 +378,7 @@ | |
28 | min_plot_qual, max_plot_qual, min_plot_length, max_plot_length), | |
29 | file=stderr) | |
30 | # Print image(s) | |
31 | - if kwargs["BASENAME"] is None and not kwargs["path"] is None: | |
32 | - file_base = kwargs["BASENAME"] | |
33 | - elif kwargs["BASENAME"] is None: | |
34 | + if kwargs["BASENAME"] is None: | |
35 | file_base = opath.splitext(opath.basename(kwargs["fastq"]))[0] | |
36 | else: | |
37 | file_base = kwargs["BASENAME"] |