diff options
author | Unrud <unrud@openaliasbox.org> | 2017-07-27 19:08:39 +0200 |
---|---|---|
committer | Unrud <unrud@openaliasbox.org> | 2017-07-27 19:08:39 +0200 |
commit | 972757bf4c6be8b966ee063e3741ced29ba8169f (patch) | |
tree | 9e5b70a6a359ea71f086ffa19c21a043efcb9bba | |
parent | Update ReadMe (diff) | |
download | radicaleinfcloud-972757bf4c6be8b966ee063e3741ced29ba8169f.tar.gz radicaleinfcloud-972757bf4c6be8b966ee063e3741ced29ba8169f.tar.bz2 radicaleinfcloud-972757bf4c6be8b966ee063e3741ced29ba8169f.zip |
Use os.walk instead of glob (fixes #2)
-rwxr-xr-x | setup.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,6 +1,5 @@ #!/usr/bin/env python3 -import glob import os import re @@ -11,7 +10,9 @@ init_path = os.path.join(os.path.dirname(__file__), with open(init_path) as f: version = re.search(r'VERSION = "([^"]+)"', f.read()).group(1) os.chdir("radicale_infcloud") -web_data = list(filter(os.path.isfile, glob.glob("web/**/*[!~]", recursive=True))) +web_data = sum(([os.path.join(root, f) for f in files + if not f.startswith(".") and not f.endswith("~")] + for root, _, files in os.walk("web")), []) os.chdir(os.pardir) setup( |