1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-04 15:54:48 +01:00

web-based administrative UI

closes #19
This commit is contained in:
Joshua Tauberer
2014-08-17 22:43:57 +00:00
parent ba8e015795
commit b30d7ad80a
19 changed files with 1527 additions and 210 deletions

View File

@@ -12,6 +12,10 @@ def mgmt(cmd, data=None, is_json=False):
response = urllib.request.urlopen(req)
except urllib.error.HTTPError as e:
if e.code == 401:
try:
print(e.read().decode("utf8"))
except:
pass
print("The management daemon refused access. The API key file may be out of sync. Try 'service mailinabox restart'.", file=sys.stderr)
elif hasattr(e, 'read'):
print(e.read().decode('utf8'), file=sys.stderr)