Commit graph

53 commits

Author SHA1 Message Date
Yu Ming Zhu
edd2dbadc5 fix flake8 2021-08-13 18:46:03 +00:00
Tomas Kopecek
06528a5650 use decode for py3 bytes/strings
Fixes: https://pagure.io/koji/issue/2976
2021-08-11 12:41:58 +02:00
Tomas Kopecek
0cfb2c0280 py3 Popen text mode fix 2021-08-11 12:41:58 +02:00
Tomas Kopecek
13f4023bf5 flake8 fixes 2021-02-16 14:43:49 +01:00
Tomas Kopecek
c6e69b4f8b backport py27 compatible file open with encoding
client and builder needs to run on py27 which doesn't support
open(encoding='utf-8')

Related: https://pagure.io/koji/issue/2641
2021-02-16 14:13:03 +01:00
Tomas Kopecek
96ae0ecef5 explicit encoding for text file operations
Fixes: https://pagure.io/koji/issue/2641
2021-01-26 13:36:25 +01:00
lrossett
1c787a323f flake8 fixes 2020-12-14 13:26:00 +01:00
Tomas Kopecek
48434f4393 vm in py3 2020-10-06 15:00:23 +02:00
Tomas Kopecek
732be23bb5 vm: revert to RawConfigParser
Fixes: https://pagure.io/koji/issue/2277
2020-08-26 09:27:29 +02:00
Tomas Kopecek
50bcb6f3bc replace md5 with sha256 2020-06-24 14:42:01 +02:00
Yu Ming Zhu
a893e8bf2b a wrapper ignoring FIPS for hashlib.md5 2020-06-24 14:42:00 +02:00
Tomas Kopecek
64a0033150 fix additional flake8 problems 2020-05-13 09:56:36 +02:00
Yuming Zhu
cf34706f04 use Exception instead of BaseException for bare expection 2020-03-03 21:38:22 +08: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
6dd77e0fa4 flake8: apply E502 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
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
Yuming Zhu
642508ccf6 flake8: follow all F rules 2020-03-03 21:35:08 +08: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
Yu Ming Zhu
4c1928f377 extract read_config_files util for config parsing 2019-10-15 09:14:16 +02: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
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
be535c2854 python-modernize -f libmodernize.fixes.fix_imports_six 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
Tomas Kopecek
379ec8ae63 python-modernize -f lib2to3.fixes.file . -w 2017-10-31 16:05:16 +01:00
Tomas Kopecek
1494301465 use new exception syntax 2017-03-02 10:52:30 -05:00
Tomas Kopecek
c143d0b88f print statement -> print function 2017-02-28 10:55:56 -05:00
Tomas Kopecek
921258749a removed unused imports 2016-10-04 15:48:54 +02:00
Pavol Babincak
9e89ebb9a4 Ran reindent.py from cpython tools on all python scripts
Citing from reindent docs:

    Change Python (.py) files to use 4-space indents and no hard tab
    characters. Also trim excess spaces and tabs from ends of lines, and
    remove empty lines at the end of files.  Also ensure the last line
    ends with a newline.

Citing from PEP 8:

    Use 4 spaces per indentation level.

    Python 2 code indented with a mixture of tabs and spaces should be
    converted to using spaces exclusively.

    Don't write string literals that rely on significant trailing
    whitespace. Such trailing whitespace is visually indistinguishable
    and some editors (or more recently, reindent.py) will trim them.

Also PyLint recommends not to have trailing whitespace on any line.
2015-05-13 16:39:53 -04:00
Mike Bonnet
ab53d2deb0 update copyright 2014-10-28 23:54:21 -04:00
Mike Bonnet
df316c0c6f xmlrpclib is not thread-safe, create a new ServerProxy instance so we're not sharing with the stream_logs thread 2014-10-28 23:54:20 -04:00
Mike Bonnet
407a1764e4 also exclude SCM metadata dirs from the sources and patches zip files of Windows builds 2012-12-19 17:10:36 -05:00
Mike Bonnet
df0e871538 handle rpm and archive tracking in buildroots separately 2011-04-26 14:30:03 -04:00
Mike Bonnet
95c61ca424 expand $name, $version, and $release in postbuild checks 2011-04-04 15:36:11 -04:00
Mike Bonnet
89d8055731 create BuildRoot objects for Windows builds, and track Windows build dependencies 2011-04-04 11:52:21 -04:00
Mike Bonnet
ea41e74a95 stream all log files to the hub 2011-04-04 11:52:20 -04:00
Mike Bonnet
20c1d4f10d set source_dir, spec_dir, and patches_dir variables when executing the build 2011-04-04 11:52:20 -04:00
Mike Bonnet
6099255dab zip checkouts of sources, spec, and patches, and include them in build output 2011-04-04 11:52:20 -04:00
Mike Bonnet
6710853fce only use patch files ending in .patch 2011-04-04 11:52:20 -04:00
Mike Bonnet
dcbe99e9e1 use full path when exec'ing tools 2011-04-04 11:52:20 -04:00
Mike Bonnet
891b5fa35e promote some useful logging from debug to info 2010-11-11 10:36:50 -05:00