dotfm

My dotfile manager
git clone git://src.gearsix.net/dotfm
Log | Files | Refs | Atom | README | LICENSE

commit 1613165133d6995d2566a2230c0e3f2d652a4bae
parent ba1f9b78521993fb2318e88bb2a73a4b5fff9d2f
Author: gearsix <gearsix@tuta.io>
Date:   Sun,  6 Jun 2021 13:43:39 +0100

changed some mkdir calls to os.makedirs

Diffstat:
Msrc/dotfm.py | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/dotfm.py b/src/dotfm.py @@ -147,7 +147,7 @@ def init_createcsv(default_location): if len(on) > 0: if on[0] == 'o': # create file at location & write KNOWN[0] to it warn('overwriting {}, all existing data in this file will be lost'.format(location)) - os.system('mkdir -p', os.path.dirname(location)) + os.makedirs(os.path.dirname(location)) dotfm_csv = open(location, "w") for i, dfl in enumerate(KNOWN[0]): dotfm_csv.write(dfl if i == 0 else ',{}'.format(dfl)) @@ -156,10 +156,11 @@ def init_createcsv(default_location): elif on[0] == 'u': debug('using pre-existing csv {}'.format(location)) sys.exit() + os.makedirs(os.path.dirname(location)) # create default_location symlink if os.path.abspath(location) != os.path.abspath(default_location): debug('creating dotfm csv file symlink') - os.system('mkdir -p', os.path.dirname(default_location)) + os.makedirs(default_location) os.system('ln -isv', os.path.abspath(location), default_location) else: f = open(location, "w")