diff --git a/kappy/kappa_std.py b/kappy/kappa_std.py index a6db3e438..78314648f 100644 --- a/kappy/kappa_std.py +++ b/kappy/kappa_std.py @@ -17,10 +17,13 @@ from .kappa_graph import KappaSnapshot def find_agent_bin(): - dune_build_dir = '_build/install/default' + potential_dirs = [] + for base_dir in [KAPPY_DIR, KASIM_DIR]: + for dune_build_dir in ['', '_build/install/default', '_build/default']: + potential_dirs.append(os.path.join(base_dir, dune_build_dir) agent_names = ['KappaSwitchman'] bin_dir = None - for potential_dir in [KAPPY_DIR, KASIM_DIR, os.path.join(KAPPY_DIR, dune_build_dir), os.path.join(KASIM_DIR, dune_build_dir)]: + for potential_dir in potential_dirs: bin_dir = os.path.join(potential_dir, 'bin') if not os.path.exists(bin_dir): continue