Skip to content

Commit

Permalink
fixes #70
Browse files Browse the repository at this point in the history
fixes #111
  • Loading branch information
git-afsantos committed Aug 19, 2021
1 parent 8e660f4 commit df875b5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions haros/haros.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def launch(self, argv=None):
return True
self.minimal_output = getattr(args, "minimal_output", False)
self._set_directories(args)
self._ensure_haros_home()
if args.debug:
logging.basicConfig(filename=self.log_path, filemode="w",
level=logging.DEBUG)
Expand Down Expand Up @@ -483,6 +484,13 @@ def _generate_dir(self, path, dir_dict, overwrite=True):
os.mkdir(new_path)
self._generate_dir(new_path, contents, overwrite=overwrite)

def _ensure_haros_home(self):
self.log.debug("HarosRunner._ensure_haros_home(%s)", self.haros_dir)
if not os.path.isdir(self.haros_dir):
if os.path.isfile(self.haros_dir):
raise RuntimeError("Could not create dir: " + self.haros_dir)
os.makedirs(self.haros_dir)


###############################################################################
# Base Command Runner
Expand Down

0 comments on commit df875b5

Please sign in to comment.