<div dir="auto">Maybe a cache dir gets removed between the funcs call. I must create a test before.<div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Regards,</div><div dir="auto">Herbert</div></div><br><div class="gmail_quote"><div dir="ltr">Em qua, 6 de fev de 2019 16:46, Holger Levsen <<a href="mailto:holger@layer-acht.org">holger@layer-acht.org</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">----- Forwarded message from hpfn-d <<a href="mailto:notifications@github.com" target="_blank" rel="noreferrer">notifications@github.com</a>> -----<br>
<br>
Date: Wed, 06 Feb 2019 10:16:08 -0800<br>
From: hpfn-d <<a href="mailto:notifications@github.com" target="_blank" rel="noreferrer">notifications@github.com</a>><br>
To: hpfn-d/piuparts_3 <<a href="mailto:piuparts_3@noreply.github.com" target="_blank" rel="noreferrer">piuparts_3@noreply.github.com</a>><br>
Cc: Holger Levsen <<a href="mailto:holger@layer-acht.org" target="_blank" rel="noreferrer">holger@layer-acht.org</a>>, Mention <<a href="mailto:mention@noreply.github.com" target="_blank" rel="noreferrer">mention@noreply.github.com</a>><br>
Subject: [hpfn-d/piuparts_3] Deep copy get file dict (#14)<br>
Reply-To: hpfn-d/piuparts_3<br>
        <<a href="mailto:reply%2B00216bbfba97340151c575fccd1d34865224deed1cee0d8992cf000000011872e66892a169ce1847e77d@reply.github.com" target="_blank" rel="noreferrer">reply+00216bbfba97340151c575fccd1d34865224deed1cee0d8992cf000000011872e66892a169ce1847e77d@reply.github.com</a>><br>
Message-ID: <hpfn-d/piuparts_3/pull/<a href="mailto:14@github.com" target="_blank" rel="noreferrer">14@github.com</a>><br>
List-ID: hpfn-d/piuparts_3 <<a href="http://piuparts_3.hpfn-d.github.com" rel="noreferrer noreferrer" target="_blank">piuparts_3.hpfn-d.github.com</a>><br>
<br>
Hi @h01ger ,<br>
<br>
Two files. Do not write 'kprdcit = get_file_dict(same params)'<br>
twice.  Use copy.deepcopy() to be safe. [Python 2 doc](<a href="https://docs.python.org/2/library/copy.html" rel="noreferrer noreferrer" target="_blank">https://docs.python.org/2/library/copy.html</a>).<br>
<br>
The patch ends here.<br>
<br>
Then, if this is acceptable, my idea is to remove the last <br>
param from 'get_file_dict' function.<br>
<br>
 - import only 'LOG_EXT'  for piuparts-report.py file.  Used in [line 1741](<a href="https://github.com/hpfn-d/piuparts_3/blob/master/piuparts-report.py#L1741" rel="noreferrer noreferrer" target="_blank">https://github.com/hpfn-d/piuparts_3/blob/master/piuparts-report.py#L1741</a>). <br>
<br>
 - the detect_well_known_errors.py file will not need to import any *_EXT.<br>
<br>
The 'get_file_dict' function and the last param are imported <br>
from piupartslib/dwke.py.<br>
<br>
The 'get_file_dict' function should then be used as:<br>
<br>
# detect_well_known_errors<br>
logditc, kprdict, bugdict = get_file_dict(dirs)<br>
<br>
# piuparts-report.py<br>
logdict, kprdict, _ = get_file_dict(dirs)<br>
You can view, comment on, or merge this pull request online at:<br>
<br>
  <a href="https://github.com/hpfn-d/piuparts_3/pull/14" rel="noreferrer noreferrer" target="_blank">https://github.com/hpfn-d/piuparts_3/pull/14</a><br>
<br>
-- Commit Summary --<br>
<br>
  * master-bin/detect_well_known_errors.py - good pratices for import<br>
  * deepcopy - get_file_dict func<br>
<br>
-- File Changes --<br>
<br>
    M master-bin/detect_well_known_errors.py (13)<br>
    M piuparts-report.py (7)<br>
<br>
-- Patch Links --<br>
<br>
<a href="https://github.com/hpfn-d/piuparts_3/pull/14.patch" rel="noreferrer noreferrer" target="_blank">https://github.com/hpfn-d/piuparts_3/pull/14.patch</a><br>
<a href="https://github.com/hpfn-d/piuparts_3/pull/14.diff" rel="noreferrer noreferrer" target="_blank">https://github.com/hpfn-d/piuparts_3/pull/14.diff</a><br>
<br>
-- <br>
You are receiving this because you were mentioned.<br>
Reply to this email directly or view it on GitHub:<br>
<a href="https://github.com/hpfn-d/piuparts_3/pull/14" rel="noreferrer noreferrer" target="_blank">https://github.com/hpfn-d/piuparts_3/pull/14</a><br>
<br>
----- End forwarded message -----<br>
<br>
-- <br>
tschau,<br>
        Holger<br>
<br>
-------------------------------------------------------------------------------<br>
               holger@(debian|reproducible-builds|layer-acht).org<br>
       PGP fingerprint: B8BF 5413 7B09 D35C F026 FE9D 091A B856 069A AA1C<br>
_______________________________________________<br>
Piuparts-devel mailing list<br>
<a href="mailto:Piuparts-devel@alioth-lists.debian.net" target="_blank" rel="noreferrer">Piuparts-devel@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/piuparts-devel" rel="noreferrer noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/piuparts-devel</a></blockquote></div>