Commit graph

63 commits

Author SHA1 Message Date
Tomas Kopecek
75ff25d4fd remove unused variable 2018-06-07 09:56:27 -04:00
Tomas Kopecek
7de48fe5ff propagate exception correctly
Fixes: https://pagure.io/koji/issue/844
2018-06-07 09:56:27 -04:00
Tomas Kopecek
c68396c059 Use unittest2 for rhel6 compatibility
Fixes: https://pagure.io/koji/issue/830
2018-06-07 09:39:39 -04:00
Tomas Kopecek
169aed66c5 make py2 files parseable with py3 2018-05-03 15:56:56 -04:00
Mike McLean
ed5ef6458c Fix typo in deleted mount check
Follow up to PR #402
Fixes #387
2018-04-24 17:20:37 -04:00
Yuming Zhu
62e94c100c fix duplicated args - parent in waittest task 2018-02-19 17:02:16 -05: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
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
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
ce6a88fa2a allow restart-hosts to work when deploying this change 2017-06-21 08:39:08 -04:00
Mike McLean
617dd468d2 avoid incorrect sleep log message 2017-06-21 08:39:08 -04:00
Mike McLean
33566487d1 fix timeout logic in wait() 2017-06-21 08:39:08 -04:00
Mike McLean
81eb30d5ce restart-hosts: new options and a timeout 2017-06-21 08:39:08 -04:00
Yuming Zhu
efc4c9bcff change run_plugin to run_callbacks and remove the modification for kojikamid.py 2017-06-20 09:32:19 -04:00
Yuming Zhu
65799703e2 push build_tag, session, scratch into callbacks 2017-06-20 09:32:19 -04:00
Yuming Zhu
cbf06f8783 remove useless import 2017-06-20 09:32:19 -04:00
Yuming Zhu
89e82d6020 only path taskinfo, scminfo, [srcdir] to plugin 2017-06-20 09:32:19 -04:00
Xibo Ning
9bf49841ad patch2 for issue 288 2017-06-20 09:32:19 -04:00
Tomas Kopecek
7d5358a336 fix python2 test 2017-06-01 09:39:24 +02:00
Tomas Kopecek
d625c0aa4d remove changes not relevant to cli 2017-06-01 09:39:24 +02:00
Tomas Kopecek
f8f373e2b6 use sorted(archs) to not confuse tests 2017-06-01 09:39:23 +02:00
Tomas Kopecek
119ecf2122 propagate exception correctly to outer scope 2017-06-01 09:39:23 +02:00
Tomas Kopecek
7d277a8ad5 urllib changes 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
1220008f8f python-modernize -f lib2to3.fixes.fix_except 2017-06-01 09:39:22 +02:00
Tomas Kopecek
b1da150c01 python-modernize -f libmodernize.fixes.fix_imports_six 2017-06-01 09:39:21 +02:00
Tomas Kopecek
7f946b37be python-modernize -f libmodernize.fixes.fix_xrange_six 2017-06-01 09:39:21 +02:00
Tomas Kopecek
32fa7f0435 parse deleted mountpoints
Related: https://pagure.io/koji/issue/387
2017-05-17 13:04:06 -04:00
Tomas Kopecek
323987e376 Allow uploading files to non-default volumes 2017-03-28 11:46:47 +02:00
Tomas Kopecek
1494301465 use new exception syntax 2017-03-02 10:52:30 -05:00
Tomas Kopecek
5ba8ed9b22 Basic test for task canfail 2017-01-12 14:28:22 -05:00
Mike McLean
aed4682411 don't error when waiting on 'canfail' tasks 2017-01-12 14:28:22 -05:00
Mike McLean
316ed1f952 fix ref to task id 2017-01-12 14:28:22 -05:00
Mike McLean
3a1d13a7b5 adjustments to WaitTestTask 2017-01-12 14:28:22 -05:00
Mike McLean
00f387b226 canfail option for BaseTaskHandler.wait() 2017-01-12 14:28:22 -05:00
Tomas Kopecek
c37effcbd7 remove unused variables/methods 2016-10-04 15:48:54 +02:00
Mohan Boddu
dd82e9cea2 Remove all bad-whitespaces
Signed-off-by: Mohan Boddu <mboddu@redhat.com>
2016-08-29 14:26:32 -04:00
Matt Prahl
f237fd5100 Adds unit tests for tasks.py
Adds Vagrant support to run unit tests
2016-07-21 17:08:45 -04: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
631f8cc254 use os.lchown() so dangling symlinks don't cause errors 2014-10-28 23:54:21 -04:00