web-based administrative UI

closes #19
This commit is contained in:
Joshua Tauberer
2014-08-17 22:46:06 +00:00
parent ba8e015795
commit b30d7ad80a
19 changed files with 1527 additions and 210 deletions
+4
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)