Revision ec5d658f kamaki/cli/commands/__init__.py

b/kamaki/cli/commands/__init__.py
57 57
            return foo(self, *args, **kwargs)
58 58
        finally:
59 59
            self._set_log_params()
60
            self._update_max_threads
61 60
    return wrap
62 61

  
63 62

  
......
171 170
            log.debug('Failed to read custom log_pid setting:'
172 171
                '%s\n default for log_pid is off' % e)
173 172

  
174
    def _update_max_threads(self):
175
        if getattr(self, 'client', None):
176
            max_threads = int(self['config'].get('global', 'max_threads'))
177
            assert max_threads > 0, 'invalid max_threads config option'
178
            self.client.MAX_THREADS = max_threads
179

  
180 173
    def _safe_progress_bar(
181 174
            self, msg, arg='progress_bar', countdown=False, timeout=100):
182 175
        """Try to get a progress bar, but do not raise errors"""

Also available in: Unified diff