import os


class MissingDataError(Exception):
    pass

FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive')

# The MICA_ARCHIVE env. var can be a colon-delimited path, which allows
# packages using pyyaks context files to see files within multiple trees.
# This can be convenient for testing and development.  Normally the flight
# path is put last so that the test path is preferred if available.
MICA_ARCHIVE_PATH = os.environ.get('MICA_ARCHIVE', FLIGHT_MICA_ARCHIVE)

# Most of the existing subpackages just expect a single path, which should
# be the test path (first one) if defined that way.
MICA_ARCHIVE = MICA_ARCHIVE_PATH.split(':')[-1]

import os


class MissingDataError(Exception):
    pass

FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive')

# The MICA_ARCHIVE env. var can be a colon-delimited path, which allows
# packages using pyyaks context files to see files within multiple trees.
# This can be convenient for testing and development.  Normally the flight
# path is put last so that the test path is preferred if available.
MICA_ARCHIVE_PATH = os.environ.get('MICA_ARCHIVE', FLIGHT_MICA_ARCHIVE)

# Most of the existing subpackages just expect a single path, which should
# be the test path (first one) if defined that way.
MICA_ARCHIVE = MICA_ARCHIVE_PATH.split(os.pathsep)[-1]

Use os.pathsep instead of ':' for windows compat
Use os.pathsep instead of ':' for windows compat

  import os
  
  
  class MissingDataError(Exception):
      pass
  
  FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive')
  
  # The MICA_ARCHIVE env. var can be a colon-delimited path, which allows
  # packages using pyyaks context files to see files within multiple trees.
  # This can be convenient for testing and development.  Normally the flight
  # path is put last so that the test path is preferred if available.
  MICA_ARCHIVE_PATH = os.environ.get('MICA_ARCHIVE', FLIGHT_MICA_ARCHIVE)
  
  # Most of the existing subpackages just expect a single path, which should
  # be the test path (first one) if defined that way.
- MICA_ARCHIVE = MICA_ARCHIVE_PATH.split(':')[-1]
+ MICA_ARCHIVE = MICA_ARCHIVE_PATH.split(os.pathsep)[-1]
  
Use os.pathsep instead of ':' for windows compat
## Code Before:
import os


class MissingDataError(Exception):
    pass

FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive')

# The MICA_ARCHIVE env. var can be a colon-delimited path, which allows
# packages using pyyaks context files to see files within multiple trees.
# This can be convenient for testing and development.  Normally the flight
# path is put last so that the test path is preferred if available.
MICA_ARCHIVE_PATH = os.environ.get('MICA_ARCHIVE', FLIGHT_MICA_ARCHIVE)

# Most of the existing subpackages just expect a single path, which should
# be the test path (first one) if defined that way.
MICA_ARCHIVE = MICA_ARCHIVE_PATH.split(':')[-1]

## Instruction:
Use os.pathsep instead of ':' for windows compat
## Code After:
import os


class MissingDataError(Exception):
    pass

FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive')

# The MICA_ARCHIVE env. var can be a colon-delimited path, which allows
# packages using pyyaks context files to see files within multiple trees.
# This can be convenient for testing and development.  Normally the flight
# path is put last so that the test path is preferred if available.
MICA_ARCHIVE_PATH = os.environ.get('MICA_ARCHIVE', FLIGHT_MICA_ARCHIVE)

# Most of the existing subpackages just expect a single path, which should
# be the test path (first one) if defined that way.
MICA_ARCHIVE = MICA_ARCHIVE_PATH.split(os.pathsep)[-1]
