replace double if/elif with
```
module_path_key = None
if 'mod_paths' in kwargs:
    module_path_key =  'mod_paths'
elif 'modulePath' in kwargs:
    module_path_key =  'modulePath'
if module_path_key is not None:
    original_module_path = os.environ['MODULEPATH']
    os.environ['MODULEPATH'] = kwargs[module_path_key]
    self.log.deprecated("Use of '%s' named argument in 'run_module'"%module_path_key, "2.0")
```