Browse Source

Switch to yaml encrypted variables

master
Daniel Berteaud 4 months ago
parent
commit
011bdc2eb0
2 changed files with 4 additions and 4 deletions
  1. 1
    1
      WAPT/control
  2. 3
    3
      setup.py

+ 1
- 1
WAPT/control View File

@@ -1,5 +1,5 @@
1 1
 package           : fws-thunderbird-sogo-addons
2
-version           : 60.0.0-3
2
+version           : 60.0.0-6
3 3
 architecture      : all
4 4
 section           : base
5 5
 priority          : optional

+ 3
- 3
setup.py View File

@@ -1,7 +1,5 @@
1 1
 # -*- coding: UTF-8 -*-
2 2
 from setuphelpers import *
3
-import json
4
-from cryptography.fernet import Fernet
5 3
 import os
6 4
 from jinja2 import Environment, FileSystemLoader
7 5
 
@@ -14,8 +12,10 @@ variables = {
14 12
 # Read local variables file if available
15 13
 if isfile(makepath(programfiles32,'wapt','private','symetric.txt')) and isfile(makepath(programfiles32,'wapt','private','variables.txt')):
16 14
     print('Reading local encrypted variables file')
15
+    from cryptography.fernet import Fernet
16
+    import yaml
17 17
     f = Fernet(open(makepath(programfiles32,'wapt','private','symetric.txt'),'r').read())
18
-    variables.update(json.loads(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read())))
18
+    variables.update(yaml.safe_load(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read())))
19 19
 
20 20
 def install():
21 21
     connector_version = control['version'].split('-',1)[0]

Loading…
Cancel
Save