flesueur / mi-lxc

Mini-Internet using LXC for practical works
GNU Affero General Public License v3.0
338 stars 24 forks source link

Refactoring - Instanciation #48

Closed MorpheusH3x closed 3 years ago

MorpheusH3x commented 3 years ago

The second part of the #47 PR. Here, I deal with all the instanciation process ( groups & templates sub-dirs and all of the json stuff ).

In dokuwiki.py (l. 24), there is the same error as in #47 PR:

  • E722: do not use bare 'except' I can't figure out which exception should be used in this built-in. Maybe we should create a custom one or remove the try-except around the for-in.
MorpheusH3x commented 3 years ago

Might as well take the opportunity to reformat the json files right away. Indeed, the point that seems to me to be limiting is that in state, json files can't be formatted by a tool. You would then have to either go for a very readable and airy version or a very dense one.

flesueur commented 3 years ago

argh, I wanted to approve the exception handling part ;). If I'm not lost, everything is approved except the JSON ? I think the JSON needs to be indented by a human. We should try to provide nice JSON, perhaps with slight differences depending on the size of the AS ?

MorpheusH3x commented 3 years ago

So I have reverted the changes I have done on the JSON files. So everything is OK.

MorpheusH3x commented 3 years ago

@flesueur So all seems ok.