def _check_path_overlap(path):
 from ..config import CONF
 specerr = 0
 if CONF['workpath'].startswith(path):
  logger.error('Specfile error: The output path "%s" contains WORKPATH (%s)', path, CONF['workpath'])
  specerr += 1
 if CONF['specpath'].startswith(path):
  logger.error('Specfile error: The output path "%s" contains SPECPATH (%s)', path, CONF['specpath'])
  specerr += 1
 if specerr:
  raise SystemExit(('Error: Please edit/recreate the specfile (%s) and set a different output name (e.g. "dist").' % CONF['spec']))
 return True

def _check_path_overlap ( path ) : from . . config import CONF specerr = 0 if CONF [ 'workpath' ] . startswith ( path ) : logger . error ( 'Specfile error: The output path "%s" contains WORKPATH (%s)' , path , CONF [ 'workpath' ] ) specerr += 1 if CONF [ 'specpath' ] . startswith ( path ) : logger . error ( 'Specfile error: The output path "%s" contains SPECPATH (%s)' , path , CONF [ 'specpath' ] ) specerr += 1 if specerr : raise SystemExit ( ( 'Error: Please edit/recreate the specfile (%s) and set a different output name (e.g. "dist").' % CONF [ 'spec' ] ) ) return True
check that path does not overlap with workpath or specpath raise systemexit if there is overlap .