Put default for xsrf environment key

Otherwise the python script scmhooks.py fails, because the environment
access with a missing key raises an error.
This commit is contained in:
Rene Pfeuffer
2020-02-13 10:34:40 +01:00
parent 1ebad2f080
commit c4dee747e3

View File

@@ -139,6 +139,8 @@ public final class HgEnvironment
Object xsrf = claims.get("xsrf");
if (xsrf != null) {
environment.put(SCM_XSRF, xsrf.toString());
} else {
environment.put(SCM_XSRF, "-");
}
}
}