Commit graph

181 commits

Author SHA1 Message Date
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
Yu Ming Zhu
49504073b1 refine import style 2020-03-03 21:35:08 +08:00
Yuming Zhu
97cfaa4fcf flake8: follow E265 rule 2020-03-03 21:35:08 +08:00
Yuming Zhu
642508ccf6 flake8: follow all F rules 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
Tomas Kopecek
0e5042832d split admin_emails option in koji.add_mail_logger
If there are multiple e-mailes separated by comma of space, they should
be split for correct usage of smtplib.sendmail.

Fixes: https://pagure.io/koji/issue/1240
2019-12-19 10:31:58 +01:00
Yu Ming Zhu
5b83c682e4 remove unused imports 2019-12-12 11:00:58 +00:00
Yu Ming Zhu
77bc43c07a sort imports in vm 2019-12-12 11:00:56 +00:00
Mike Bonnet
be31305f52 include CHECKSUM_TYPES in kojikamid.py, and use it when validating checksums of downloaded files
The Koji data model has been updated to support multiple checksum types. These are listed in the
CHECKSUM_TYPES enum in koji/__init__.py, but are not available in kojikamid.py. This change
copies the Enum class and the CHECKSUM_TYPES enum into kojikamid at build time, and uses it when
validating the checksums of downloaded files.
2019-11-27 16:42:24 +01:00
Mike Bonnet
4cd37132dd kojikamid.py: use urllib from six.moves
kojikamid has the SCM class from daemon.py inserted into it at build time. This class
has been converted to use urllib from six.moves (for Python 3 compatibility), rather
than using urlparse. Update the import in kojikamid.py to be compatible with this change.
2019-11-27 16:42:24 +01:00
Mike Bonnet
3d7a6af560 fix argument type in format string
Argument is a string, not a float.
2019-11-27 16:42:24 +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
Yu Ming Zhu
135ac0d6ae clean python compiled binaries for non *.py code
fixes: #1698
2019-10-31 13:20:53 +01:00
Yu Ming Zhu
4c1928f377 extract read_config_files util for config parsing 2019-10-15 09:14:16 +02:00
Tomas Kopecek
46f85c9b86 verifyChecksum fails for non-output files
PR #967 introduced another error. Before verifyChecksum was used only
from kojikamid and it made sense, that it failed on other files. Now it
is used also for build requires, etc. As it makes no harm (read-only),
we can extend this check for other paths.

Fixes: https://pagure.io/koji/issue/1669
2019-10-15 09:10:10 +02:00
Yu Ming Zhu
2034695e88 add an option to set server realm for all clients 2019-10-10 16:37:56 +02:00
Tomas Kopecek
63648170df Fix typo preventing vm builds
Bug introduced in PR #967 prevents vm builds to work. There is an
additional option to method verifyChecksum.

Fixes: https://pagure.io/koji/issue/1665
2019-10-09 09:15:14 +02:00
Mike McLean
daa58d4f9d kojivmd, too 2019-02-21 11:22:34 -05:00
Mike Bonnet
6bdb18e26f re-add import removed by 921258749a
kojikamid has code from other files substituted into it, to reduce
copy-paste. In this case, the SCM class from koji/daemon.py
requires the urlparse module.
2019-01-15 11:42:21 -05:00
Mike McLean
8a36479cdb fix undefined var 2019-01-15 10:51:19 -05:00
Mike McLean
4fa2901720 cleanup
unused var
whitespace
missing import
2019-01-15 10:51:19 -05:00
Tomas Kopecek
4191840bd7 check_sigmd5 for kojivmd 2019-01-15 10:51:19 -05:00
Tomas Kopecek
28ce53afc3 use correct fileinfo checksum field
Fixes: https://pagure.io/koji/issue/966
2019-01-15 10:51:19 -05:00
Tomas Kopecek
f4ee150026 drop encode_int helper
We're already using i8 encoding mechanism, so this function is no more
needed.

Fixes: https://pagure.io/koji/issue/750
2018-12-03 23:55:39 -05:00
Tomas Kopecek
6f7f828f77 python-modernize -f lib2to3.fixes.fix_except 2018-07-11 17:37:40 -04:00
Tomas Kopecek
caae1a0a8b workaround unnecessary list conversions 2018-07-11 17:37:40 -04:00
Tomas Kopecek
8e61dc7c56 python-modernize -f libmodernize.fixes.fix_classic_division 2018-07-11 17:37:40 -04:00
Tomas Kopecek
be535c2854 python-modernize -f libmodernize.fixes.fix_imports_six 2018-07-11 17:37:39 -04:00
Tomas Kopecek
d92fa1fa9c python-modernize -f libmodernize.fixes.fix_file 2018-07-11 17:37:39 -04:00
Tomas Kopecek
7f6b717eb6 python-modernize -f libmodernize.fixes.fix_import 2018-07-11 17:37:39 -04:00
Tomas Kopecek
bcee24e50c python-modernize -f libmodernize.fixes.fix_dict_six 2018-07-11 17:37:39 -04:00
Franz Chih-Ping Hsieh
f356ac4f17 force using python2 to run script
Fixes #945
2018-05-24 00:01:30 -04:00
Mike McLean
4c07073403 simplify check for krbV module 2018-04-02 16:38:27 -04:00
Mike McLean
91b306e108 Avoid failing at import time if krbV module is missing
Several parts of Koji already handled this absence gracefully. This change
extends that behavior to all places where krbV is imported.
2018-04-02 16:38:27 -04:00
Tomas Kopecek
8f22069fda drop old ssl support + compatrequests
Koji now uses ssl via python-requests

 - use_old_ssl option is removed
 - koji.ssl library removed
 - compatrequests dropped

Related: https://pagure.io/koji/issue/467
2018-01-03 12:47:03 +01:00
Tomas Kopecek
7c62fb7023 Don't check non-existing file
Related: https://pagure.io/koji/issue/665
2017-11-09 17:50:57 -05:00
Tomas Kopecek
379ec8ae63 python-modernize -f lib2to3.fixes.file . -w 2017-10-31 16:05:16 +01:00
Mike McLean
900767cf4b add krb_canon_host option to various clients 2017-10-27 15:32:25 -04:00
Tomas Kopecek
bf0552e6de use contextlib wrapper for older python-requests 2017-10-16 10:03:42 -04:00
Tomas Kopecek
7e2cb6b156 replace pycurl with requests
Related: https://pagure.io/koji/issue/600
2017-10-16 10:03:42 -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
ca9bd3941b kojivmd: fix typo in serverca path and also fix cert value 2017-08-23 15:00:02 -04:00
Mike McLean
3461e334b2 fix serverca default in kojivmd 2017-08-23 15:00:02 -04:00
Mike McLean
83e47bf42a update docs links in service configs 2017-08-08 12:18:04 -04:00
Tomas Kopecek
d625c0aa4d remove changes not relevant to cli 2017-06-01 09:39:24 +02:00
Tomas Kopecek
644792ff76 replace urlgrabber with pycurl 2017-06-01 09:39:23 +02:00
Tomas Kopecek
a4a1536a03 python-modernize -f libmodernize.fixes.fix_file 2017-06-01 09:39:22 +02:00
Tomas Kopecek
68bf19c739 python-modernize -f libmodernize.fixes.fix_dict_six 2017-06-01 09:39:22 +02:00