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