cleanup makedir
This commit is contained in:
parent
77f313001a
commit
842daf7924
1 changed files with 2 additions and 6 deletions
|
|
@ -4,11 +4,7 @@ import os
|
|||
import argparse
|
||||
import time
|
||||
import tempfile
|
||||
|
||||
def make_dir(d):
|
||||
if not os.path.exists(d):
|
||||
os.mkdir(d)
|
||||
|
||||
|
||||
def delete_all(d):
|
||||
files = list_all(d)
|
||||
if not files:
|
||||
|
|
@ -57,7 +53,7 @@ def run(editor, sk_path, filename=None):
|
|||
def main():
|
||||
home_path = os.getenv("HOME")
|
||||
sk_path = os.path.join(home_path, ".skratch")
|
||||
make_dir(sk_path)
|
||||
os.makedirs(sk_path, exist_ok=True)
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
prog='skratch',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue