Commit 0e48f0d0 authored by Kiste's avatar Kiste
Browse files

Make keyring optional

parent d104b9b5
# TODO
- Keyring deaktivierbar machen
- Keine Doku schreiben
......@@ -12,9 +12,11 @@ setup(
author_email='christian.buschau@stud.uni-hannover.de',
packages=['studsauger'],
install_requires=[
'keyring',
'requests'
],
extras_require={
'Keyring support': ['keyring']
},
entry_points={
'console_scripts': [
'studsauger = studsauger.studsauger:main'
......
......@@ -3,7 +3,14 @@
import argparse
import json
import os
import keyring
try:
import keyring
except ImportError:
usekeyring = False
else:
usekeyring = True
from .logik import logik
def main():
......@@ -50,7 +57,9 @@ def main():
else:
print('Kein Benutzer angegeben!')
exit(1)
keyringpw = keyring.get_password('studsauger', user)
keyringpw = None
if usekeyring:
keyringpw = keyring.get_password('studsauger', user)
if keyringpw:
password = keyringpw
if args.password or 'password' in config:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment