(self, fileName=None)
| 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 | |
| 70 | if __name__ == "__main__": |
| 71 | db = DbConnection() |