def get_secret_key(self):
        """Get a django secret key,try to read provided one,or generate it."""
        jsonf, secret = self.dotslash("secret.json"), os.environ.get("secret")
        if not secret:
            try:
                with open(jsonf, "r") as f:
                    secret = loads(f.read()).get("secret")
            except (IOError, IndexError):
                with open(jsonf, "w") as f:
                    secret = uuid4().hex
                    f.write(dumps({"secret": secret}, indent=4) + "\n")
        return secret
dataset/ETHPy150Open amitu/importd/importd/__init__.py/D.get_secret_key/original