chiark / gitweb /
mirror: fix syntax error on Python 3.4
authorHans-Christoph Steiner <hans@eds.org>
Thu, 30 Nov 2017 13:02:02 +0000 (14:02 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Thu, 30 Nov 2017 13:03:04 +0000 (14:03 +0100)
It seems that Python 3.5 is more flexible with * expansion, Python 3.4 says:

SyntaxError: only named arguments may follow *expression
https://travis-ci.org/f-droid/fdroidserver/jobs/309194065

fdroidserver/mirror.py

index 06595a44338a9b9827ea53dfd8313ade37d2d93f..0aa437228ecd4fbdcd67104d1878c0696242d9c8 100644 (file)
@@ -157,7 +157,8 @@ def main():
                     for k in update.GRAPHIC_NAMES:
                         f = d.get(k)
                         if f:
-                            urls.append(_append_to_url_path(*components, f))
+                            filepath_tuple = components + (f, )
+                            urls.append(_append_to_url_path(*filepath_tuple))
                     _run_wget(os.path.join(basedir, *components), urls)
                     for k in update.SCREENSHOT_DIRS:
                         urls = []
@@ -165,7 +166,8 @@ def main():
                         if filelist:
                             components = (section, app['packageName'], locale, k)
                             for f in filelist:
-                                urls.append(_append_to_url_path(*components, f))
+                                filepath_tuple = components + (f, )
+                                urls.append(_append_to_url_path(*filepath_tuple))
                             _run_wget(os.path.join(basedir, *components), urls)
 
         urls = dict()