Commit graph

525 commits

Author SHA1 Message Date
Mike McLean
12f156d1f3 fix exception syntax 2017-12-07 18:16:03 -05:00
Patrick Uiterwijk
fbbd5cd168 Fix resetting the environment
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2017-12-07 18:16:03 -05:00
Mike McLean
66e42e9bfc fix another bare exception 2017-12-07 18:16:03 -05:00
Mike McLean
960c1f861d be a little more paranoid about undoing opts/environ mangling 2017-12-07 18:16:03 -05:00
Mike McLean
64375197ff avoid bare exception and add some debug logging 2017-12-07 18:16:03 -05:00
Patrick Uiterwijk
7a2f2a7d4b Implement support for keytab in gssapi codepaths
This had been a TODO that until now wasn't critical since python2 would fall back to krbV.
For python3, we only have gssapi, so implement keytabs and ccache for gssapi.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2017-12-07 18:16:03 -05:00
Mike McLean
8a4c75ee7f rename fixPrint->_fix_print and add a docstring 2017-12-06 13:32:51 +08:00
Yuming Zhu
3464adae2e cli: fix changelog encode for PY3
relates [issue#577](https://pagure.io/koji/issue/577)
2017-12-06 13:32:29 +08:00
Luiz Carvalho
a6f84f9a1e Import koji.plugin explicitly
The run_callbacks method assumes koji.plugin has already been imported.

Signed-off-by: Luiz Carvalho <lucarval@redhat.com>
2017-11-13 14:46:31 +08:00
Yuming Zhu
5c11e60293 fix dict comprehension on py2.6 2017-11-09 17:47:36 -05:00
Yuming Zhu
14a24abbde make grab_session_options to accept dict directly
fixes #663
2017-11-09 17:47:36 -05:00
Mike McLean
af71756fa7 fix exception syntax in apply_argspec 2017-11-09 17:40:52 -05:00
Mike McLean
75d192a149 update legacy signatures 2017-11-09 17:40:52 -05:00
Mike McLean
d8132543c5 move apply_argspec to koji.util 2017-11-09 17:40:52 -05:00
Mike McLean
89825a8d2d drop unused/incomplete parseParams method for now 2017-11-09 17:40:52 -05:00
Mike McLean
bf9e7520f7 fix defaults handling in apply_argspec 2017-11-09 17:40:52 -05:00
Mike McLean
9e48e440e8 cleanup, more testing 2017-11-09 17:40:52 -05:00
Mike McLean
e6de3e0d62 function to parse task parameters into a dictionary 2017-11-09 17:40:52 -05:00
Mike McLean
8a8999e01c partial work on apply_argspec function 2017-11-09 17:40:52 -05:00
Franz Chih-Ping Hsieh
efe68e54df - add unit test for koji/util: (coverage 58%->100%)
- minor fix: check if input string time is valid
2017-11-07 09:58:21 -05:00
Mike McLean
6bb32b699e handle DateTime objects in encode_datetime 2017-11-02 15:59:18 -04:00
Tomas Kopecek
1f6ca9ae72 python-modernize -f lib2to3.fixes.fix_numliterals . -w 2017-10-31 16:07:34 +01:00
Tomas Kopecek
379ec8ae63 python-modernize -f lib2to3.fixes.file . -w 2017-10-31 16:05:16 +01:00
Tomas Kopecek
d6a5cdf987 python-modernize -f lib2to3.fixes.fix_except . -w 2017-10-31 16:05:16 +01:00
Mike McLean
b848458251 safe_rmtree: make return value consistent with past behavior 2017-10-30 12:09:04 -04:00
Mike McLean
a2d9d756fe drop stale comment and avoid bare except in safe_rmtree 2017-10-30 12:09:04 -04:00
Tomas Kopecek
5b23fb1629 consolidate safe_rmtree, rmtree and shutil.rmtree
shutil.rmtree should be avoided in almost all cases
safe_rmtree has its usage in tasks module, but innards are replaced with
koji.util.rmtree, so we don't have two implementations of same task

Related: https://pagure.io/koji/issue/648
2017-10-30 12:09:04 -04:00
Mike McLean
edda41100c krb_canon_host option to canonicalize hostname via dns 2017-10-27 15:32:25 -04:00
Yuming Zhu
7f302491f9 use urlparse.parse_qs instead of deprecated cgi.parse_qs 2017-10-11 14:52:48 +00:00
Mike McLean
80ca9ff294 handle callbacks depth-first in DataWalker 2017-10-11 16:36:40 -04:00
Tomas Kopecek
c86f41ebcf some tests for koji.auth 2017-10-11 12:14:15 -04:00
Mike McLean
9bcce9dc3e pull in core volume policy functions from earlier branches 2017-10-06 17:16:03 -04:00
Tomas Kopecek
470addae97 fix formatTime for DateTime
Related: https://pagure.io/koji/issue/623
2017-10-06 17:10:12 -04:00
Mike McLean
204a1969e1 use_old_ssl is deprecated 2017-09-22 11:04:35 -04:00
Mike McLean
c457d07246 fix up url checks and extend unit tests for this issue 2017-09-19 14:43:23 -04:00
Patrick Uiterwijk
2ef60eada5 Run normpath over SCM url when checking against allowed
This will make sure that when we check the allowed SCM url, any ./ and ../ are resolved.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2017-09-19 12:52:56 -04:00
Mike McLean
ea89245352 allow profiles to request a specific python version 2017-09-18 16:26:55 -04:00
Mike McLean
3f0d107c2e handle LONGFILESIZES rpm header field 2017-09-08 16:33:09 -04:00
Mike McLean
062a38c1b6 handle all long rpm size headers 2017-09-08 16:33:09 -04:00
Mike McLean
a3bc0f6871 we need xmlrpcplus in py3 too 2017-08-25 16:48:02 -04:00
Mike McLean
cea43dd458 correct range for i8 (64 bit signed) 2017-08-25 16:48:02 -04:00
Mike McLean
4eabd8b7da py3 fixes for xmlrpcplus 2017-08-25 16:48:02 -04:00
Mike McLean
1604610248 allow_none is always on for us 2017-08-25 16:48:02 -04:00
Mike McLean
98f8b150aa can't use __dump from parent class 2017-08-25 16:48:02 -04:00
Mike McLean
be2fae90ae move custom xmlrpc marshaller to its own file 2017-08-25 16:48:02 -04:00
Mike McLean
2865f2421b avoid using encode_int in some of the client code 2017-08-25 16:48:02 -04:00
Mike McLean
ab48fa80b2 move xmlrpc marshaller into lib and use i8 for large ints 2017-08-25 16:48:02 -04:00
Tomas Kopecek
6930880480 check RPMTAG_LONGSIZE is RPMTAG_SIZE is null
Related: https://pagure.io/koji/issue/541
2017-08-08 12:13:06 -04:00
Patrick Uiterwijk
56b023b158 Error out if krbV is unavailable and gssapi did not work
In python3, krbV is unavailable, which means that we should not stay
silent if gssapi login failed.

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-08-08 11:09:52 -04:00
Mike McLean
0c8d4c8f07 implement caching in _fix_cb_args 2017-08-07 12:41:40 -04:00