Even more coverage is on it's way. Have still to figure out in which
manner i'm going to test the things i want to.
It's actually not as easy as i expected...
Namely:
* f => file_handle
* errstr => err_str
* intendantion adjustements.
* factor out uneccessary if-return-else-return-clause.
Also a new functionality to NOT check for users existence but everything
else. Needed to sanitize in case it's a backup of the current running
instance already. This further adds to commit
b4bb45ef85.
... fixup some variable names, also a `pass` that i forget to delete
beforehand.
Also, as you can see in the title, i added the ability to sanitize a
given csv file in case the user didnt supply the --Import flag. Thus, it
isnt required anymore.
Which also includes two TODO-Tasks.
We had not proven ourselfs worthy of the holy-PEP-construct yet, so we
have to rename the whole file to backu.py, which follows snake_case, and
it's classes members.
They now embrace it as they should've done in the first place!
The dragon which we just encountered isnt as big as we thought and we
can still fight it with our as-easy-as-it-gets task to just snip out the
class and give it it's own residence under lib/backup.py-File!
Typing will be handy in further development, as well will i settle down
to sqlite3.Row. Fetchall() returns now a list(grr) with
dict-imitating/sumating objects, which you can call keys() on and will
return them, what we now already use for Backups, which comes handy.
Also Typing gives the ability to let the code even more documentate
itself. It's planned to use all over the place but i've to read myself
into it yet more to get started on that one.
It's a step in the right direction!
On every register() call the System rewrites the /home/users.txt to
reflect currently active users. Will fall apart when something
unexpected happened, but that's @helix responsibility.
The sceleton for the interface and it's first possible argument are
finished, so a users pbukey can be changed now without touching the DB
itself directly.
Checking for users existence and the presence of options/arguments is
done beforehand and will throw out when nothing useful got delivered to
the script.