Skip to content

Commit b05bc30

Browse files
committed
Error message if not in a scram area.
1 parent 4ee3c8b commit b05bc30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-cms-cvs-history

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ if __name__ == "__main__":
5454
if not command in ["diff", "import", "log", "tags"]:
5555
parser.error("`git cms-cvs-history' requires either `import`, `diff' or `log' sub-command")
5656

57-
if not environ["CMSSW_BASE"]:
57+
cmssw_base = environ.get("CMSSW_BASE", None)
58+
if not cmssw_base:
5859
die("Please setup your CMSSW area")
5960

60-
cmssw_base = environ["CMSSW_BASE"]
6161
err, output = getstatusoutput(format("cd $CMSSW_BASE/src ; git init"))
6262
if err:
6363
die("Error while setting up git repository")

0 commit comments

Comments
 (0)