Skip to content
Snippets Groups Projects
Commit 19dde591 authored by ferrari's avatar ferrari
Browse files

fix defaults path issue

parent 32b72639
Branches
No related tags found
No related merge requests found
from setuptools import setup, find_packages from setuptools import setup, find_packages
setup(name='auto_git_info', setup(name='auto_git_info',
version='1.1.0', version='1.1.1',
description='Automatically log your command line arguments and commit sha', description='Automatically log your command line arguments and commit sha',
author='Maxence Ferrari', author='Maxence Ferrari',
py_modules=['auto_git_info'], py_modules=['auto_git_info'],
......
__version__ = "1.1.0" __version__ = "1.1.1"
...@@ -26,8 +26,8 @@ def log_info(args, *, path=None, **kwargs): ...@@ -26,8 +26,8 @@ def log_info(args, *, path=None, **kwargs):
if '/' in path: if '/' in path:
os.makedirs(path.rsplit('/', 1)[0], exist_ok=True) os.makedirs(path.rsplit('/', 1)[0], exist_ok=True)
else: else:
if not os.path.isdir('../run_log'): if not os.path.isdir('run_log'):
os.makedirs('../run_log') os.makedirs('run_log')
path = 'run_log/' + time + '.json' path = 'run_log/' + time + '.json'
with open(path, 'w') as logfile: with open(path, 'w') as logfile:
repo = git.Repo(os.path.dirname(os.path.abspath(__main__.__file__)), search_parent_directories=True) repo = git.Repo(os.path.dirname(os.path.abspath(__main__.__file__)), search_parent_directories=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment