1 |
On Mon, 14 Mar 2016 10:14:15 -0700 |
2 |
Zac Medico <zmedico@g.o> wrote: |
3 |
|
4 |
> On 03/05/2016 01:37 PM, Brian Dolbec wrote: |
5 |
> |
6 |
> > Zac, I'm done with code changes in the rewrite. Ready for a last |
7 |
> > look before a merge. Can you have a look again? I did some |
8 |
> > changes/fixes and rebased them in. Floppym hasn't reported any |
9 |
> > more bugs, so I think it's ready for broader testing in a release. |
10 |
> > Then we can work on moving all the test data to a separate file in |
11 |
> > the tree or downloaded... |
12 |
> |
13 |
> The dynamic_data stuff in Scanner is a little hard to follow. Then it |
14 |
> calls dynamic_data.update(rdata), is there any chance that the update |
15 |
> operation might clobber something that shouldn't have been clobbered? |
16 |
> |
17 |
|
18 |
No, mostly it just adds new variables to the dynamic_data dictionary. |
19 |
In that way it is important the order the checks are run as many rely |
20 |
on data supplied by previous checks. |
21 |
|
22 |
As I recall there are only a few that are modified by the checks, but |
23 |
they need to be. |
24 |
|
25 |
I still need to establish a good way of tracking those. Maybe |
26 |
something new in the module_spec. But I don't know if that really |
27 |
needs an openrc like needs, before, after... But they do need to be |
28 |
listed to ease later additions/removals of modules. |
29 |
|
30 |
|
31 |
|
32 |
> Also, I see that the number of sys.exit calls in pym/repoman is up |
33 |
> from 37 to 41. I would prefer that we raise exceptions for the caller |
34 |
> to handle, rather than call sys.exit directly. I suppose we change |
35 |
> that later though, after we merge the code. |
36 |
> -- |
37 |
> Thanks, |
38 |
> Zac |
39 |
> |
40 |
|
41 |
hmm, I don't recall adding any, that doesn't sound like me. I did |
42 |
cringe a little every time I came across them. I do agree that they |
43 |
need a better system. But I was concentrating on the modularization. |
44 |
|
45 |
Rather than wrapping the modules in try: except: pairs, perhaps we |
46 |
could add another variable to the dynamic_data similar to "continue", |
47 |
only an abandon-ship one, maybe "abort" to take them out of the |
48 |
modules. Then the Scanner class could handle the exit in one |
49 |
consistent place. Try/except can work nicely, but I've had to disable |
50 |
far too many to troubleshoot code from their misuse and being nested 5 |
51 |
or more deep. |
52 |
|
53 |
-- |
54 |
Brian Dolbec <dolsen> |