Apache CloudStack for Arch Linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.4 KiB

  1. From: Pekka Helenius <pekka.helenius@fjordtek.com>
  2. Subject: Change obsolete Python 2 syntax to Python 3
  3. --- a/setup/bindir/cloud-setup-encryption.in 2022-01-23 22:33:06.840315209 +0200
  4. +++ b/setup/bindir/cloud-setup-encryption.in 2022-01-23 22:34:32.063576599 +0200
  5. @@ -139,7 +139,7 @@
  6. def prepareDBFiles(self):
  7. def prepareDBDotProperties():
  8. dbpPath = os.path.join(self.dbConfPath, 'db.properties')
  9. - dbproperties = file(dbpPath).read().splitlines()
  10. + dbproperties = open(dbpPath).read().splitlines()
  11. newdbp = []
  12. emptyLine = 0
  13. for line in dbproperties:
  14. @@ -175,7 +175,7 @@
  15. entries.insert(index, '')
  16. else:
  17. entries.insert(index, "%s=%s"%(key, value))
  18. - file(os.path.join(self.dbConfPath, 'db.properties'), 'w').write('\n'.join(entries))
  19. + open(os.path.join(self.dbConfPath, 'db.properties'), 'w').write('\n'.join(entries))
  20. self.info("Finalizing setup ...", None)
  21. finalizeDbProperties()
  22. @@ -189,7 +189,7 @@
  23. def saveMgmtServerSecretKey():
  24. if self.encryptiontype == 'file':
  25. - file(self.encryptionKeyFile, 'w').write(self.mgmtsecretkey)
  26. + open(self.encryptionKeyFile, 'w').write(self.mgmtsecretkey)
  27. def formatEncryptResult(value):
  28. return 'ENC(%s)'%value