MCPcopy Create free account
hub / github.com/apache/cloudstack / executeSqlFromFile

Method executeSqlFromFile

tools/marvin/marvin/dbConnection.py:58–68  ·  view source on GitHub ↗
(self, fileName=None)

Source from the content-addressed store, hash-verified

56 return resultRow
57
58 def executeSqlFromFile(self, fileName=None):
59 if fileName is None:
60 raise cloudstackException.\
61 InvalidParameterException("file can't not none")
62
63 if not os.path.exists(fileName):
64 raise cloudstackException.\
65 InvalidParameterException("%s not exists" % fileName)
66
67 sqls = open(fileName, "r").read()
68 return self.execute(sqls)
69
70if __name__ == "__main__":
71 db = DbConnection()

Callers

nothing calls this directly

Calls 3

executeMethod · 0.95
existsMethod · 0.65
readMethod · 0.45

Tested by

no test coverage detected