mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
buildserver: use py3's pathlib to generate cache file URL
This should handle edge cases better, like odd characters in the path, etc.
This commit is contained in:
parent
97be5a1d00
commit
a3d32c65a4
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import requests
|
||||
import stat
|
||||
import sys
|
||||
@ -52,9 +53,8 @@ options, args = parser.parse_args()
|
||||
cachedir = os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver')
|
||||
config = {
|
||||
'basebox': 'jessie64',
|
||||
# TODO in py3, convert this to pathlib.Path(absolute_path_string).as_uri()
|
||||
'baseboxurl': [
|
||||
'file://' + os.path.join(cachedir, 'jessie64.box'),
|
||||
pathlib.Path(os.path.join(cachedir, 'jessie64.box')).as_uri(),
|
||||
'https://f-droid.org/jessie64.box',
|
||||
],
|
||||
'debian_mirror': 'http://http.debian.net/debian/',
|
||||
|
Loading…
Reference in New Issue
Block a user