Verified Commit 752623fe authored by Oskar Roesler's avatar Oskar Roesler
Browse files

Only pre-check for path existance if specified in special name exception handling in parser.py

parent 45603667
......@@ -30,10 +30,10 @@ def main(argv):
args = parser.parse_args(argv)
def retry_with_rosdistro_name():
def retry_with_rosdistro_name(check_path=False):
routines = Routines()
name = "ros-{0}-{1}".format(routines.get_ros_distro(), args.package)
if os.path.exists(os.path.join(routines.cache_path, 'packages', name)):
if not check_path or os.path.exists(os.path.join(routines.cache_path, 'packages', name)):
try:
commands(args.command, name, args.verbose, args.quiet)
except KeyError:
......@@ -49,7 +49,7 @@ def main(argv):
except KeyError:
retry_with_rosdistro_name()
except FileNotFoundError:
retry_with_rosdistro_name()
retry_with_rosdistro_name(check_path=True)
if __name__=='__main__':
main(sys.argv)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment