Commit graph

64 commits

Author SHA1 Message Date
Sebastien Awwad
d98152bc9d
Remove some unnecessary try-reraise constructions; thanks, pylint!
These changes simplify logic, removing some try/except structures
that were unnecessary and potentially confusing, and get us back
to passing pylint's test.

pylint 2.0.0 adds try-except-raise tests, to catch immediate
re-raising after catching an exception, outside of some special
cases. See this GitHub comment for more info:
https://github.com/theupdateframework/tuf/pull/770#issuecomment-412993992

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-08-21 14:59:29 -04: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
3894bc4e31
Add copyright and license info to module files
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-11-30 13:23:38 -05:00
Vladimir Diaz
c508a52171
Do not use deprecated logger.warn() in roledb.py
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-11-27 15:25:21 -05:00
Vladimir Diaz
de4cfa3e88
Resolve remaining Pylint warnings for roledb.py
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-11-20 14:10:22 -05:00
Vladimir Diaz
9fe00756ef
Remove compression from roledb and update its unit tests 2017-08-25 13:46:31 -04:00
Vladimir Diaz
c8413600f8
Remove check for
for unknown repository name in get_delegated_rolenames()
2017-07-13 16:40:46 -04:00
Vladimir Diaz
58ab40c203
Remove check for unknown repository name
roledb.get_role_paths() contains a check for an unknown repository name that is already done by _check_rolename()
2017-07-13 16:05:53 -04:00
Vladimir Diaz
e7de36b2df
Fix docstring to mention expected tuf.exceptions.UnknownRoleError 2017-07-13 15:39:23 -04:00
Vladimir Diaz
97f5e107df Fix imports statements in roledb.py and test_roledb.py 2017-01-11 12:43:04 -05:00
Vladimir Diaz
0f3e5a11aa Raise expected tuf.exception exceptions in roledb.py 2017-01-11 12:22:55 -05:00
Vladimir Diaz
f9660b4797 More import statementment replacements to various modules 2017-01-10 17:05:12 -05:00
Vladimir Diaz
e8fecfe509 Replace import statements in roledb.py 2017-01-10 10:43:52 -05:00
Vladimir Diaz
84304de69e Fix for issue #413 2016-12-23 10:56:07 -05:00
Vladimir Diaz
0d59cac627 Fix remaining issues 2016-11-10 09:49:08 -05:00
Vladimir Diaz
bea840f4ab Ensure the expected formats.py is imported in the remaining modules 2016-11-09 15:35:36 -05:00
Artiom Baloian
b07d9a5d0f Move some part of tufformats into the common formats 2016-10-31 19:04:14 -04:00
Artiom Baloian
8247a02737 Moved TuF exceptions and schem into the ssl_commons 2016-10-31 11:58:05 -04:00
Artiom Baloian
7098cdbc3a Move _vendor dir and split formats into the formats and tufformats 2016-10-28 18:37:28 -04:00
Vladimir Diaz
0e6e3418d2 Add code coverage for non-dirty roles given to role.db.unmark_dirty() 2016-10-27 16:38:07 -04:00
Vladimir Diaz
6a10090cd1 Clean up exception message 2016-10-27 16:26:18 -04:00
Vladimir Diaz
58af0b5428 Add unmark_dirty() to roledb.py 2016-10-27 15:04:16 -04:00
Vladimir Diaz
8882dc5b7b Merge branch 'root-versioning' of https://github.com/ecordell/tuf into ecordell-root-versioning
Conflicts:
	tests/test_key_revocation.py
	tests/test_replay_attack.py
	tests/test_repository_tool.py
	tests/test_updater.py
	tuf/formats.py
	tuf/repository_lib.py
2016-10-17 15:57:48 -04:00
Evan Cordell
a11709000d Add root versioning for root key rotation 2016-09-19 15:18:20 -04:00
Vladimir Diaz
5e2d177f4d Add test case for _load_top_level_metadata() and debug statements to missing else clauses 2016-08-30 17:09:03 -04:00
Vladimir Diaz
f9e22f0b36 Add function to mark roles as dirty and update setup.py to list tuf.py 2016-08-25 14:22:31 -04:00
Vladimir Diaz
e0a4f18223 Improve code coverage 2016-07-21 10:28:46 -04:00
Vladimir Diaz
11ae261ffd Rename 'clear_all_except_default' to 'clear_all' in roledb.py 2016-07-15 13:47:04 -04:00
Vladimir Diaz
000e77a3c9 Reference global values in roledb 2016-07-15 13:23:17 -04:00
Vladimir Diaz
1bf5aa2396 Add repository_name parameters to sig.py 2016-05-16 14:26:38 -04:00
Vladimir Diaz
cc6609f3f6 Implement remaining test conditions in test_roledb.py 2016-05-11 17:50:19 -04:00
Vladimir Diaz
ad08f499e9 Add missing unit test, and update tests in roledb.py to verify 'repository_name' argument 2016-05-11 16:57:46 -04:00
Vladimir Diaz
8e4a036f56 Implement tests for create_roledb() and remove_roledb() 2016-05-09 18:00:28 -04:00
Vladimir Diaz
4b9f469230 Implement add and remove roledb functions to roledb.py 2016-05-09 17:28:43 -04:00
Vladimir Diaz
9d85b5f4b1 Update test_roledb.py following refactoring of roledb.py
refactored roledb.py to keep track of multiple sets of role info.
2016-05-06 16:54:45 -04:00
Vladimir Diaz
e3a1544070 Begin implementation changes to address issue with a global role and key database 2016-05-06 12:13:57 -04:00
Vladimir Diaz
44ebd65b34 Remove roledb.get_parent_roles() 2016-03-31 13:09:03 -04:00
Vladimir Diaz
aaf755e381 Delete remove_delegated_roles() and modify affected lines (including add_role())
We shouldn't remove delegated roles if the repository can resemble a graph of delegations, since the delegations of one role are independent of another
2016-03-30 16:43:51 -04:00
Vladimir Diaz
9536cacdee Fix bug where the snapshot and timestamp roles are listed in snapshot.json 2016-03-29 15:28:18 -04:00
Vladimir Diaz
51adc771a0 More bug fixes
When loading roles from disk, ensure these roles are not marked as dirty.  Add a boolean to relevant functions to provide the option to update the roledb without marking roles as dirty
2016-03-28 17:49:56 -04:00
Vladimir Diaz
8ccdff540f Convert list of dirty roles to set to avoid duplicates 2016-03-28 16:25:49 -04:00
Vladimir Diaz
283c62abe0 More unit test fixes
A delegated rolename is no longer required to start with 'targets'
2016-03-25 11:59:11 -04:00
Vladimir Diaz
f844d1e6f1 wrap line 2016-03-24 13:14:41 -04:00
Vladimir Diaz
b982c063db Latest WIP 2016-03-22 11:26:55 -04:00
Vladimir Diaz
a111661a72 Fix roledb.get_delegated_roles() and test cases in test_repository_tool.py 2016-03-02 13:08:46 -05:00
Vladimir Diaz
1cbae5aa4c More changes for 1.0 tasks 2016-03-02 09:49:59 -05:00
Vladimir Diaz
1c8f41b0c0 Update import statements of unvendored dependencies 2015-06-02 08:29:22 -04:00
vladdd
88d686b258 Initial implementation of custom FILEINFO 2014-06-23 13:33:01 -04:00
Vladimir Diaz
ab95a4b3aa [WIP] Python 2+3 support.
Python 2+3 unicode.
libraries.
The following modules (and their tests) work in PY2.7+3.3:
keydb, hash, formats, mirrors
2014-04-29 14:27:34 -04:00
Vladimir Diaz
a7f28b9af4 [WIP] Python 2+3 support.
Add six, convert PY <=2.5 exception handling, dictionary iteration, libraries, 1/2 the tests.
2014-04-22 15:03:42 -04:00