

'''Utility functions.'''


def ensure_list(string_or_list):
    if isinstance(string_or_list, str):
        return [string_or_list]
    else:
        return string_or_list



'''Utility functions.'''


def ensure_list(string_or_list_or_none):
    if isinstance(string_or_list_or_none, str):
        return [string_or_list_or_none]
    else:
        return string_or_list_or_none or []

Fix crash when there are no includes for a task
Fix crash when there are no includes for a task

  
  
  '''Utility functions.'''
  
  
- def ensure_list(string_or_list):
+ def ensure_list(string_or_list_or_none):
-     if isinstance(string_or_list, str):
+     if isinstance(string_or_list_or_none, str):
-         return [string_or_list]
+         return [string_or_list_or_none]
      else:
-         return string_or_list
+         return string_or_list_or_none or []
  
Fix crash when there are no includes for a task
## Code Before:


'''Utility functions.'''


def ensure_list(string_or_list):
    if isinstance(string_or_list, str):
        return [string_or_list]
    else:
        return string_or_list

## Instruction:
Fix crash when there are no includes for a task
## Code After:


'''Utility functions.'''


def ensure_list(string_or_list_or_none):
    if isinstance(string_or_list_or_none, str):
        return [string_or_list_or_none]
    else:
        return string_or_list_or_none or []
