Skip to content

Commit

Permalink
fix(windows-error): use ~ instead of USERNAME
Browse files Browse the repository at this point in the history
resolves #382
  • Loading branch information
mostaphaRoudsari committed Sep 11, 2020
1 parent 78e3a8b commit 7db0874
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions butterfly/runmanager_bluecfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@
"""
import os
import ctypes
import time
import sys
import platform
from subprocess import PIPE, Popen
from collections import namedtuple
from copy import deepcopy
from .runmanagerenv import bluecfd as bcfdenv
from .version import Version
import butterfly


Expand All @@ -42,8 +39,9 @@ def __init__(self, project_name):
self._blue_folder = butterfly.config['of_folder']
self._env = bcfdenv(self._blue_folder)
self._project_name = project_name
self._project_folder = r'c:\Users\{}\butterfly\{}'.format(
os.getenv('USERNAME'), self._project_name)
self._project_folder = os.path.join(
os.path.expanduser('~'), 'butterfly', self._project_name
)
self.log_folder = './log'
self.errFolder = './log'
self._process = None
Expand Down
2 changes: 1 addition & 1 deletion butterfly/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class Version(object):
"""Version class."""

bf_ver = "0.0.4"
bf_ver = "0.0.5"
of_ver = "4.0"
of_full_ver = "v1706+"
is_using_docker_machine = True # useful to run OpenFOAM container
Expand Down

0 comments on commit 7db0874

Please sign in to comment.