| Date: Sat, 20 May 2017 23:55:34 +0200
More style fixes + note on logging
Diffstat:
M amprolla-init | 4 ++--
M lib/log.py | 3 +++
M lib/net.py | 5 ++---
3 files changed, 7 insertions(+), 5 deletions(-)
--- |
| t@@ -9,10 +9,10 @@ import lib.config as config
import lib.delta as delta
import lib.fs as fs
import lib.net as net
-from lib.log import die, notice, warn, cleanexit
+from lib.log import notice, warn
-def popDirs():
+def pop_dirs():
paths = fs.crawl()
notice("creating initial directory structure") |
| t@@ -4,7 +4,6 @@
import requests
-import config
from log import die, notice, warn, cleanexit
t@@ -12,10 +11,10 @@ def download(url, path):
print("\tdownloading: %s\n\tto: %s" % (url, path))
r = requests.get(url, stream=True)
if r.status_code == 404:
- warn("not found!")
+ warn("download of %s failed: not found!", url)
return
elif r.status_code != 200:
- die("fail!")
+ die("download of %s failed", url)
with open(path, "wb") as f:
# XXX: should be more on gbit servers |