def update(self,updates={}):
try:<EOL><INDENT>csp = self.read()<EOL><DEDENT>except:<EOL><INDENT>csp = {'<STR_LIT>':"<STR_LIT>"}<EOL>self.write(csp)<EOL><DEDENT>csp.update(updates)<EOL>self.write(csp)<EOL>
update csp_default.json with dict

if file empty add default-src and create dict