diff --git a/hub/kojihub.py b/hub/kojihub.py index bf14df40..e081f710 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -8417,8 +8417,10 @@ class RootExports(object): def restartHosts(self, priority=5, options=None): context.session.assertPerm('admin') if options is None: - options = {} - return make_task('restartHosts', [options], priority=priority) + args = [] + else: + args = [options] + return make_task('restartHosts', args, priority=priority) def build(self, src, target, opts=None, priority=None, channel=None): """Create a build task diff --git a/koji/tasks.py b/koji/tasks.py index 9e793f8a..917ff871 100644 --- a/koji/tasks.py +++ b/koji/tasks.py @@ -531,7 +531,9 @@ class RestartHostsTask(BaseTaskHandler): Methods = ['restartHosts'] _taskWeight = 0.1 - def handler(self, options): + def handler(self, options=None): + if options is None: + options = {} # figure out which hosts we're restarting hostquery = {'enabled': True} if 'channel' in options: