Tue, 18 Sep 2018 19:09:16 -0500
Horrible py2app hack
borgend/repository.py | file | annotate | diff | comparison | revisions |
--- a/borgend/repository.py Tue Sep 18 18:58:19 2018 -0500 +++ b/borgend/repository.py Tue Sep 18 19:09:16 2018 -0500 @@ -4,8 +4,18 @@ # Repository abstraction for queuing. # +import os +env=os.environ.copy() +if '_PY2APP_LAUNCHED_' in env: + # Horrible hack to make keyring work the shit knownas py2app. + from keyring.backends.OS_X import Keyring + import keyring + keyring.set_keyring(Keyring()) +else: + # Normal import + import keyring + import weakref -import keyring import logging from . import config