Skip to content

Commit

Permalink
prepare release to v1.0.2 (issue #17)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Baraka authored and David Baraka committed Jun 14, 2020
1 parent 52d9c5d commit 0f1edd4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion policygenerator/interface/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ <h2 id="sec-title-13W">
<strong>Policy revisions:</strong> Once you have exported your policy, you can add, remove, and change its text in the policy file directly. Such revision may be particular useful if you want to include privacy practices that are not covered by PrivacyFlash Pro.
</div>
<div id="version-number">
<a href="https://github.com/privacy-tech-lab/privacyflash-pro" target="_blank">PrivacyFlash Pro on GitHub</a>, v1.0.1
<a href="https://github.com/privacy-tech-lab/privacyflash-pro" target="_blank">PrivacyFlash Pro on GitHub</a>, v1.0.2
</div>
</div>
</div>
Expand Down
20 changes: 13 additions & 7 deletions policygenerator/src/privacy_practices.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@
"""


import os
from os import path
import os, sys
import yaml
from .constants import Practices


def getFilePath(relativePath):
""" Get absolute path to resource, works for dev and for PyInstaller """
if getattr(sys, 'frozen', False):
application_path = sys._MEIPASS
return os.path.join(application_path, relativePath[3:])
else:
application_path = os.path.dirname(__file__)
return os.path.join(application_path, relativePath)

def retrieve_privacy_practice_data():
"""
Retrieves from privacy_practices.yaml values of plist, entitlement, framework
Expand Down Expand Up @@ -45,8 +52,8 @@ def retrieve_privacy_practice_data():
may contain an empty list or an array specifying parameter(s) for unique
Objective-C and Swift APIs as evidence for a privacy practice.
"""
pp = path.join(path.dirname(
path.realpath(__file__)), '../spec/privacy_practices.yaml')

pp = getFilePath('../spec/privacy_practices.yaml')
with open(pp, 'r') as evidence:
privacy_practices = yaml.safe_load(evidence)

Expand Down Expand Up @@ -178,8 +185,7 @@ def load_third_df():
Find ad networks dataframe and parse into a dictionary to be read
:return final_ads: dictionary of every SDK along with their type
"""
pp = path.join(path.dirname(
path.realpath(__file__)), '../spec/third_parties.yaml')
pp = getFilePath('../spec/third_parties.yaml')
with open(pp, 'r') as evidence:
df = yaml.safe_load(evidence)

Expand Down

0 comments on commit 0f1edd4

Please sign in to comment.