Commit graph

73 commits

Author SHA1 Message Date
Jana Cupova
32b5377392 Remove translation stub functions
Fixes: https://pagure.io/koji/issue/3072
2021-10-21 13:25:16 +02:00
Tomas Kopecek
ba2e1e520b basic security checks with bandit
Fixes: https://pagure.io/koji/issue/3042
2021-10-20 15:20:14 +02:00
Jana Cupova
74112e804f method call json default option set up to str
Fixed: https://pagure.io/koji/issue/3065
2021-10-19 12:40:56 +02:00
Tomas Kopecek
5d86608931 Honour --force-auth for anonymous commands
Fixes: https://pagure.io/koji/issue/2657
2021-09-14 13:26:11 +02:00
Jana Cupova
bc2a51350d Enable/disable channel
Fixes: https://pagure.io/koji/issue/1851
2021-07-20 10:33:50 +02:00
Ken Dreyer
8d0b4bc618 cli: catch koji.ParameterError in list_task_output_all_volumes
When we send an RPC with a parameter that the hub does not understand,
we get a koji.ParameterError.

Update list_task_output_all_volumes() to catch the specific error we
expect here.

The purpose of this change is to make the code easier to understand.
2021-03-25 13:59:59 +01:00
Tomas Kopecek
29a34f31a5 cli: show connection exception
For anonymous calls (whose use ensure_connection) is now shown also
original exception if --debug is specified.

Fixes: https://pagure.io/koji/issue/2592
2021-03-10 15:31:11 +01:00
Mike McLean
5bc690c4ea support modules and other btypes in download-build
Fixes https://pagure.io/koji/issue/2677
2021-03-03 14:11:20 +01:00
Ken Dreyer
659a450bc1 cli: support download-build --type=remote-sources
Prior to this change, "koji download-build --type=remote-sources" failed
with an AssertionError.

Add support for OSBS's cachito remote-sources btype.
2021-02-02 14:45:30 +01:00
Ken Dreyer
8321df159b cli: raise NotImplementedError with btype name
Print the exact unhandled btype name to the user, so it's clearer why
we're exiting early here.
2021-01-12 13:17:42 +01:00
Tomas Kopecek
866c81cb63 cli: some options are not supplied in all _list_tasks calls
Fixes: https://pagure.io/koji/issue/2585
2021-01-04 10:42:34 +01:00
Tomas Kopecek
254c766b1f cli: create after/before OptionParser helper 2020-12-01 14:40:51 +01:00
Tomas Kopecek
0256282a84 cli: list-task --after/--before/--all
allow querying for closed tasks

Fixes: https://pagure.io/koji/issue/2565
2020-12-01 13:02:25 +01:00
Tomas Kopecek
bc478c2d68 cli: show log urls for failed tasks
Fixes: https://pagure.io/koji/issue/2188
2020-10-02 12:44:07 -04:00
Tomas Kopecek
dbd0c9ac9c cli: delete downloaded file with zero size
Fixes: https://pagure.io/koji/issue/2451
2020-09-07 10:10:59 +02:00
Tomas Kopecek
7223e278d3 don't check size for signed rpms 2020-09-04 08:28:15 +02:00
Tomas Kopecek
ecf50429ed cli: download_file redownload if we've larger file
Fixes: https://pagure.io/koji/issue/2465
2020-09-04 08:28:15 +02:00
Tomas Kopecek
53d1081f27 cli: don't check size for signed rpms
We store only size of unsigned copy in db, so checking it for signed
rpms results in error.

Fixes: https://pagure.io/koji/issue/2394
2020-08-03 09:50:22 +02:00
Tomas Kopecek
f8419e3626 remove deprecated krbV support
Fixes: https://pagure.io/koji/issue/1991
2020-07-24 15:08:47 -04:00
Yu Ming Zhu
a893e8bf2b a wrapper ignoring FIPS for hashlib.md5 2020-06-24 14:42:00 +02:00
Tomas Kopecek
be57b32f42 cli: flush stdout during watch-logs
Fixes: https://pagure.io/koji/issue/2227
2020-05-20 10:42:49 +02:00
Tomas Kopecek
291f04301b download_archive / download_rpm methods for CLI
Fixes: https://pagure.io/koji/issue/1880
2020-03-25 14:03:47 +01:00
Frank Ch. Eigler
18d7fc8f82 Range: header: use old school fmt % operator
This should be more compatible with old pythons.
2020-03-25 14:03:47 +01:00
Frank Ch. Eigler
41b0f6d86e issues/1880: send Range: header to accelerate duplicate/partial downloads 2020-03-25 14:03:47 +01:00
Tomas Kopecek
bb9c72092b use only gssapi_login in CLI
Fixes: https://pagure.io/koji/issue/1906
2020-03-09 15:13:36 +01:00
Yuming Zhu
c5db34a8e1 flake8: apply E501 with max-line-length=99 2020-03-03 21:38:22 +08:00
Yuming Zhu
f1ba6cefd7 flake8: apply all rest E7 rules 2020-03-03 21:38:22 +08:00
Yuming Zhu
6ed30954b2 flake8: apply E71x rule 2020-03-03 21:38:22 +08:00
Yuming Zhu
0f727a2ab4 flake8: apply E3 rules 2020-03-03 21:38:22 +08:00
Yuming Zhu
05340b146b flake8: apply E2 rules except E266 2020-03-03 21:38:21 +08:00
Yuming Zhu
ce1f9928af flake8: apply E1 rules 2020-03-03 21:38:21 +08:00
Yuming Zhu
97cfaa4fcf flake8: follow E265 rule 2020-03-03 21:35:08 +08:00
Tomas Kopecek
638f6cc6f2 replace xmlrpc_client exception with requests
It is broken in startup function for kojid and kojivmd from the
introduction of requests.

Fixes: https://pagure.io/koji/issue/1914
2020-02-21 12:40:42 +01:00
Yu Ming Zhu
8c21aa7e6d sort imports in cli 2019-12-12 11:00:57 +00:00
Tomas Kopecek
dd4a7edcfd get_usage_str 2019-12-11 11:47:01 +01:00
Tomas Kopecek
98b83eff69 fix downloads w/o content-length
Fixes: https://pagure.io/koji/issue/982
2019-11-25 14:51:08 +01:00
Mike McLean
d53fefa640 Split out inheritance flags formatting 2019-10-15 08:50:16 +02:00
Tomas Kopecek
9491c078bb remove deprecated koji_cli.lib_unique_path
Fixes: https://pagure.io/koji/issue/1459
2019-08-12 17:57:49 -04:00
Tomas Kopecek
558e129c6b use same arch parsing for cli and hub
Related: https://pagure.io/koji/issue/1237
2019-05-21 18:39:52 -04:00
Tomas Kopecek
70968aba33 Remove python2.4 OptionParse fix
Fixes: https://pagure.io/koji/issue/1341
2019-03-20 16:09:44 -04:00
Mike McLean
a55ea5c2d6 drop unused write_to_stdout function
this was added after 1.16 and no longer used, so no point in keeping it
2019-03-04 09:57:15 -05:00
Mike McLean
b4b6e2e6cc simpler function for dumping bytes to stdout 2019-03-04 09:57:15 -05:00
Tomas Kopecek
a4d41bd078 wrapper function for writing to stdout 2019-02-19 17:29:25 -05:00
Ken Dreyer
9fe61b561f cli: document parse_arches method parameters
Document the parameters for the parse_arches method.
2018-11-29 08:22:13 -07:00
Mike McLean
65a3dc0953 move inner function out of except clause 2018-11-28 15:25:57 -05:00
Yuming Zhu
9a0d735d40 move quiet option into ki_handler 2018-11-28 15:25:57 -05:00
Yuming Zhu
30ed89e485 cli: add a param in watch_tasks to override KeyboardInterrupt output 2018-11-28 15:25:57 -05:00
Chenxiong Qi
5a3246f22a Ignore non-existing option when activate a session
For kerberos auth, if not login with a keytab and principal, those two
options may not be present in the incoming options.

Similarly, debug is also an optional option that could not exist.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2018-10-21 15:54:05 -04:00
Tomas Kopecek
c64f3389c7 fix utf-8 output in CLI
Fixes: https://pagure.io/koji/issue/1010
2018-08-16 09:17:11 -04:00
Tomas Kopecek
913efc47d1 Raise error for non-200 codes in download_file
Fixes: https://pagure.io/koji/issue/1020
2018-08-08 11:20:33 -04:00