Use YAML formatted variable file
This commit is contained in:
parent
b89a87ec04
commit
3cce9d7478
|
@ -1,5 +1,5 @@
|
||||||
package : fws-tightvnc-server
|
package : fws-tightvnc-server
|
||||||
version : 2.8.11-3
|
version : 2.8.11-4
|
||||||
architecture : all
|
architecture : all
|
||||||
section : base
|
section : base
|
||||||
priority : optional
|
priority : optional
|
||||||
|
|
6
setup.py
6
setup.py
|
@ -1,7 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from setuphelpers import *
|
from setuphelpers import *
|
||||||
from cryptography.fernet import Fernet
|
|
||||||
import json
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
uninstallkey = []
|
uninstallkey = []
|
||||||
|
@ -15,8 +13,10 @@ variables = {
|
||||||
# Read local variables file if available
|
# Read local variables file if available
|
||||||
if isfile(makepath(programfiles32,'wapt','private','symetric.txt')) and isfile(makepath(programfiles32,'wapt','private','variables.txt')):
|
if isfile(makepath(programfiles32,'wapt','private','symetric.txt')) and isfile(makepath(programfiles32,'wapt','private','variables.txt')):
|
||||||
print('Reading local encrypted variables file')
|
print('Reading local encrypted variables file')
|
||||||
|
from cryptography.fernet import Fernet
|
||||||
|
import yaml
|
||||||
f = Fernet(open(makepath(programfiles32,'wapt','private','symetric.txt'),'r').read())
|
f = Fernet(open(makepath(programfiles32,'wapt','private','symetric.txt'),'r').read())
|
||||||
variables.update(json.loads(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read())))
|
variables.update(yaml.safe_load(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read())))
|
||||||
|
|
||||||
def install():
|
def install():
|
||||||
print('Installing TightVNC Server')
|
print('Installing TightVNC Server')
|
||||||
|
|
Loading…
Reference in New Issue