generated from NOAA-GFDL/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Currently ocean_grid_generator.py uses subprocess to get the script location, and check the git information. Below is a better way to get that information. Consider updating.
scriptpath = os.path.realpath(__file__)
scriptbasename = os.path.basename(scriptpath)
scriptdirname = os.path.dirname(scriptpath)
scriptgithash = subprocess.check_output(['git', 'rev-parse', 'HEAD'],
cwd=scriptdirname)
scriptgithash = scriptgithash.decode('ascii').rstrip("\n")
scriptgitMod = subprocess.check_output(['git', 'status', '--porcelain',
scriptbasename],
cwd=scriptdirname)
scriptgitMod = scriptgitMod.decode('ascii').rstrip("\n")Metadata
Metadata
Assignees
Labels
No labels