Mercurial > bitten > bitten-test
changeset 301:d486e34084af
Normalize the path names of environments passed to the `bitten-master` script. Previously, a path with a trailing slash would cause the master to assume an empty string as the base name of the project.
author | cmlenz |
---|---|
date | Mon, 07 Nov 2005 10:51:58 +0000 |
parents | 585ed4cd921e |
children | fe966b950424 |
files | bitten/master.py |
diffstat | 1 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/master.py +++ b/bitten/master.py @@ -419,17 +419,18 @@ host = ip envs = [] - names = set() - for arg in args: - if not os.path.isdir(arg): - log.warning('Ignoring %s: not a directory', arg) + env_names = set() + for env_path in [os.path.normpath(arg) for arg in args]: + if not os.path.isdir(env_path): + log.warning('Ignoring %s: not a directory', env_path) continue - name = os.path.basename(arg) - if name in names: - log.warning('Ignoring %s: duplicate project name "%s"', arg, name) + env_name = os.path.basename(env_path) + if env_name in env_names: + log.warning('Ignoring %s: duplicate project name "%s"', env_path, + env_name) continue - names.add(name) - env = Environment(arg) + env_names.add(env_name) + env = Environment(env_path) if BuildSystem(env): if env.needs_upgrade(): log.warning('Environment at %s needs to be upgraded', env.path)