From 26e2ab106eeda3dc396b32d6e6eaac39526f1ccd Mon Sep 17 00:00:00 2001 From: yiyang5055 Date: Thu, 28 Jan 2021 09:18:00 +0000 Subject: [PATCH] fix: default boilerplate path --- boilerplate/boilerplate.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/boilerplate/boilerplate.py b/boilerplate/boilerplate.py index 63f74963..5618b9ab 100755 --- a/boilerplate/boilerplate.py +++ b/boilerplate/boilerplate.py @@ -19,8 +19,6 @@ import argparse import difflib import glob -import json -import mmap import os import re import sys @@ -33,12 +31,12 @@ nargs='*') # Rootdir defaults to the directory **above** the repo-infra dir. -rootdir = os.path.dirname(__file__) + "./../../../" +rootdir = os.path.dirname(__file__) + "./../../" rootdir = os.path.abspath(rootdir) parser.add_argument( "--rootdir", default=rootdir, help="root directory to examine") -default_boilerplate_dir = os.path.join(rootdir, "csi-driver-nfs/hack/boilerplate") +default_boilerplate_dir = os.path.abspath(os.path.dirname(__file__)) parser.add_argument( "--boilerplate-dir", default=default_boilerplate_dir) @@ -199,4 +197,4 @@ def main(): return 0 if __name__ == "__main__": - sys.exit(main()) \ No newline at end of file + sys.exit(main())