
import multiprocessing

from .base import Processor


class BackgroundProcessor(Processor):
    '''Local background processor.'''
    
    def process(self, command, args=None, kw=None):
        '''Process *command* with *args* and *kw*.'''
        process = multiprocessing.Process(target=command, args=args, kwargs=kw)
        process.start()
        process.join()



import multiprocessing

from .base import Processor


class BackgroundProcessor(Processor):
    '''Local background processor.'''
    
    def process(self, command, args=None, kw=None):
        '''Process *command* with *args* and *kw*.'''
        if args is None:
            args = ()
        
        if kw is None:
            kw = {}
        
        process = multiprocessing.Process(target=command, args=args, kwargs=kw)
        process.start()
        process.join()


Fix passing invalid None to multiprocessing Process class.
Fix passing invalid None to multiprocessing Process class.

  
  import multiprocessing
  
  from .base import Processor
  
  
  class BackgroundProcessor(Processor):
      '''Local background processor.'''
      
      def process(self, command, args=None, kw=None):
          '''Process *command* with *args* and *kw*.'''
+         if args is None:
+             args = ()
+         
+         if kw is None:
+             kw = {}
+         
          process = multiprocessing.Process(target=command, args=args, kwargs=kw)
          process.start()
          process.join()
  
  
Fix passing invalid None to multiprocessing Process class.
## Code Before:

import multiprocessing

from .base import Processor


class BackgroundProcessor(Processor):
    '''Local background processor.'''
    
    def process(self, command, args=None, kw=None):
        '''Process *command* with *args* and *kw*.'''
        process = multiprocessing.Process(target=command, args=args, kwargs=kw)
        process.start()
        process.join()


## Instruction:
Fix passing invalid None to multiprocessing Process class.
## Code After:

import multiprocessing

from .base import Processor


class BackgroundProcessor(Processor):
    '''Local background processor.'''
    
    def process(self, command, args=None, kw=None):
        '''Process *command* with *args* and *kw*.'''
        if args is None:
            args = ()
        
        if kw is None:
            kw = {}
        
        process = multiprocessing.Process(target=command, args=args, kwargs=kw)
        process.start()
        process.join()

