Skip to content

Commit

Permalink
adding support mail into critical-fail banner (Nitrokey#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
daringer committed Aug 25, 2020
1 parent 73184c0 commit 9189f66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions pynitrokey/confconsts.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ class Verbosity(IntEnum):
LOG_FORMAT = '%(relativeCreated)-8d %(levelname)6s %(name)10s %(message)s'

GH_ISSUES_URL = "https://github.com/Nitrokey/pynitrokey/issues/"
SUPPORT_EMAIL = "[email protected]"
4 changes: 3 additions & 1 deletion pynitrokey/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
from typing import List
from getpass import getpass

from pynitrokey.confconsts import LOG_FN, LOG_FORMAT, GH_ISSUES_URL, VERBOSE, Verbosity
from pynitrokey.confconsts import LOG_FN, LOG_FORMAT, GH_ISSUES_URL, SUPPORT_EMAIL
from pynitrokey.confconsts import VERBOSE, Verbosity

def to_websafe(data):
data = data.replace("+", "-")
Expand Down Expand Up @@ -104,6 +105,7 @@ def local_critical(*messages, support_hint=True, ret_code=1, **kwargs):
"Critical error occurred, exiting now",
"Unexpected? Is this a bug? Do you would like to get support/help?",
f"- You can report issues at: {GH_ISSUES_URL}",
f"- Writing an e-mail to: {SUPPORT_EMAIL} is also possible",
f"- Please attach the log: '{LOG_FN}' with any support/help request!",
"-" * 80, "")
sys.exit(ret_code)
Expand Down

0 comments on commit 9189f66

Please sign in to comment.