
import os


CONFIG_ENV_VAR_NAME = 'BYCEPS_CONFIG'


def get_config_env_name_from_env(*, default=None):
    """Return the configuration environment name set via environment
    variable.

    Raise an exception if it isn't set.
    """
    env = os.environ.get(CONFIG_ENV_VAR_NAME)

    if env is None:
        if default is None:
            raise Exception(
                "No configuration environment was specified via the '{}' "
                "environment variable.".format(CONFIG_ENV_VAR_NAME))

        env = default

    return env


import os


CONFIG_ENV_VAR_NAME = 'BYCEPS_CONFIG'


def get_config_env_name_from_env():
    """Return the configuration environment name set via environment
    variable.

    Raise an exception if it isn't set.
    """
    env = os.environ.get(CONFIG_ENV_VAR_NAME)

    if not env:
        raise Exception(
            "No configuration environment was specified via the '{}' "
            "environment variable.".format(CONFIG_ENV_VAR_NAME))

    return env

Remove default argument from function that reads the configuration name from the environment
Remove default argument from function that reads the configuration name from the environment

  
  import os
  
  
  CONFIG_ENV_VAR_NAME = 'BYCEPS_CONFIG'
  
  
- def get_config_env_name_from_env(*, default=None):
+ def get_config_env_name_from_env():
      """Return the configuration environment name set via environment
      variable.
  
      Raise an exception if it isn't set.
      """
      env = os.environ.get(CONFIG_ENV_VAR_NAME)
  
+     if not env:
-     if env is None:
-         if default is None:
-             raise Exception(
+         raise Exception(
-                 "No configuration environment was specified via the '{}' "
+             "No configuration environment was specified via the '{}' "
-                 "environment variable.".format(CONFIG_ENV_VAR_NAME))
+             "environment variable.".format(CONFIG_ENV_VAR_NAME))
- 
-         env = default
  
      return env
  
Remove default argument from function that reads the configuration name from the environment
## Code Before:

import os


CONFIG_ENV_VAR_NAME = 'BYCEPS_CONFIG'


def get_config_env_name_from_env(*, default=None):
    """Return the configuration environment name set via environment
    variable.

    Raise an exception if it isn't set.
    """
    env = os.environ.get(CONFIG_ENV_VAR_NAME)

    if env is None:
        if default is None:
            raise Exception(
                "No configuration environment was specified via the '{}' "
                "environment variable.".format(CONFIG_ENV_VAR_NAME))

        env = default

    return env

## Instruction:
Remove default argument from function that reads the configuration name from the environment
## Code After:

import os


CONFIG_ENV_VAR_NAME = 'BYCEPS_CONFIG'


def get_config_env_name_from_env():
    """Return the configuration environment name set via environment
    variable.

    Raise an exception if it isn't set.
    """
    env = os.environ.get(CONFIG_ENV_VAR_NAME)

    if not env:
        raise Exception(
            "No configuration environment was specified via the '{}' "
            "environment variable.".format(CONFIG_ENV_VAR_NAME))

    return env
