diff --git a/personal_data/main.py b/personal_data/main.py index c50a819..6006323 100644 --- a/personal_data/main.py +++ b/personal_data/main.py @@ -98,7 +98,7 @@ def get_cookiejar(use_cookiejar: bool): if len(cookiejar) > 10: return cookiejar browser_cookie3.firefox( - '/home/jmaa/.cachy/mbui5xg7.default-release/cookies.sqlite' + '/home/jmaa/.cachy/mbui5xg7.default-release/cookies.sqlite', ) if len(cookiejar) > 10: return cookiejar diff --git a/setup.py b/setup.py index 0e33e85..aa67576 100644 --- a/setup.py +++ b/setup.py @@ -54,6 +54,7 @@ PACKAGE_DESCRIPTION_SHORT = """ This program collects several small data fetchers, for downloading personal data spread around the internet.""".strip() + def parse_version_file(text: str) -> str: text = re.sub('^#.*', '', text, flags=re.MULTILINE) match = re.match(r'^\s*__version__\s*=\s*(["\'])([\d\.]+)\1$', text) @@ -62,6 +63,7 @@ def parse_version_file(text: str) -> str: raise Exception(msg) return match.group(2) + with open(PACKAGE_NAME + '/_version.py') as f: version = parse_version_file(f.read())