2 Commits
1.0.0 ... 1.0.2

Author SHA1 Message Date
a4ecb0e8a0 fix permissions 2021-02-22 18:33:43 +01:00
27b2aea827 msg in error 2021-02-22 17:30:41 +01:00
2 changed files with 5 additions and 2 deletions

View File

@ -3,3 +3,4 @@ CONTENT_TYPE = "text/html"
0 13 1 * * user /opt/app/monatliche-forderung-eintragen.py
0 4 * * * user /opt/app/monatliche-forderung-ueberwachen.py

View File

@ -3,12 +3,12 @@
import requests
import datetime
class ResourceNotFoundException(Exception): pass
class ServerException(Exception): pass
def postJson(url):
resp = requests.post(url)
if resp.status_code != 202:
raise ResourceNotFoundException("URL: {}, Code: {}".format(url, resp.status_code))
raise ServerException("URL: {}, Code: {}, Msg: {}".format(url, resp.status_code, resp.text))
return resp.json()
@ -23,3 +23,5 @@ try:
print("Monatliche Mietforderungen erfolgreich eintragen")
except Exception as e:
print("ERROR: {}".format(e))