Commit graph

18 commits

Author SHA1 Message Date
Kainaat Singh
ec68bd9316 Remove future module #1297
Signed-off-by: Kainaat Singh <kainaatsingh93@gmail.com>

remove unwanted lines
2021-04-11 11:37:45 +02:00
Jussi Kukkonen
d5b6f91f6f imports: Remove unused imports
The linter now understands our imports (yay), and complains a lot (boo):
* Remove really unused imports
* disable lints for tuf.log and securesystemslib imports: these imports
  have logging side-effects (they set default loggers for tuf and
  securesystemslib respectively) and I'm cautious about just removing
  them

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-03-19 16:56:50 +02:00
Jussi Kukkonen
fe3daccdb5 imports: Make 'updater' import vendoring-compatible
Make the updater imports compatible with vendoring tool by importing
the Updater class directly (don't import the whole module to avoid the
clash with the obvious variable name 'updater').

Also update the example: This is not required in the clients but tuf
source code will be vendored and this import line (even though in a
comment) might trigger an error in future vendoring tool releases.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-03-19 16:56:50 +02:00
Jussi Kukkonen
c66c61f1d0 imports: Make 'settings' imports vendoring-compatible
Use "from tuf import <module>" instead of "import tuf.<module>": this
makes it possible for vendoring tool to vendor tuf. Fix all references
to <module> in the code.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-03-19 16:56:50 +02:00
Jussi Kukkonen
07b3aed03c imports: Make 'log' imports vendoring-compatible
Use "from tuf import <module>" instead of "import tuf.<module>": this
makes it possible for vendoring tool to vendor tuf. Fix all references
to <module> in the code.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-03-19 16:56:50 +02:00
Jussi Kukkonen
4b078b0975 imports: Make 'exceptions' imports vendoring-compatible
Use "from tuf import <module>" instead of "import tuf.<module>": this
makes it possible for vendoring tool to vendor tuf. Fix all references
to <module> in the code.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-03-19 16:54:39 +02:00
Martin Vrachev
946d11bca4 Make confined_target_dirs optional field
The field confined_target_dirs from the MIRROR_SCHEMA  is
a list of strings. Those strings define the accessible target
paths for that mirror. For one target to be available for that mirror,
its path should have as a prefix at least one of the strings defined
in confined_target_dirs.

That's why when confined_target_dirs is a list with one element empty
string (e.g. ['']) this means all targets files on that mirror are
available and if confined_target_dirs is empty list (e.g. []) this
would be interpreted as none of the target files is available.

This is a confusing API that could easily lead to mistakes.
That's why it's better we promote to not set confined_target_dirs
at all if a user wants targets to be available.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2020-10-16 15:35:24 +03:00
Joshua Lock
292b18926b Use __name__ for loggers, per convention
Replace hard-coded logger names with __name__. For the most part this just uses
the standard conventions to create the same logger hierarchy as existed before.
The only real difference is that loggers created for printing during tests are
no longer part of the 'tuf' hierarchy.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-03-03 10:36:39 +00:00
Michael Zhou
bcbb213613 Added command-line option explanations and usage examples
Signed-off-by: Michael Zhou <myz227@nyu.edu>
2018-11-03 10:48:05 -04:00
Vladimir Diaz
e42874db46
Catch tuf.exceptions.Error in client.py to prevent printing exception trace
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-06-28 12:38:55 -04:00
Vladimir Diaz
9cd8a6d6a3
Resolve pylint warnings in client.py for 'redefined variable'
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-04-17 15:29:17 -04:00
Vladimir Diaz
7021dba285
Remove unused import statement in client.py
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-04-17 15:25:20 -04:00
Vladimir Diaz
fe5d335555
Modify modules to remove/expect no leading path separators
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-04-06 13:16:41 -04:00
Vladimir Diaz
e61138c382
Revise client.py help descriptions
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-02-08 17:14:15 -05:00
Vladimir Diaz
8f65fa4154
Rename license files in modules
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-02-05 11:31:19 -05:00
Vladimir Diaz
6a7db797d5
Remove print statement for parsed argument
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-02-01 14:59:42 -05:00
Vladimir Diaz
812a395f75
Switch to argparse, modify command-line behavior, revise
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-01-29 17:05:01 -05:00
Vladimir Diaz
d7bb67b8c4
Initial edit of client script
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-01-24 17:31:42 -05:00
Renamed from tuf/scripts/basic_client.py (Browse further)