diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/getenv.py | 20 | ||||
-rw-r--r-- | src/backend/syncdb.py | 6 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/backend/getenv.py b/src/backend/getenv.py index 1418d88..fdb47d4 100644 --- a/src/backend/getenv.py +++ b/src/backend/getenv.py @@ -19,23 +19,23 @@ def bhaddr(): return bhaddr -def csvURL(): - csvURL = bhaddr() - packagesCsvURL = [] - descriptionsCsvURL = [] +def csvaddr(): + csvaddr = bhaddr() + pcsvaddr = [] + dcsvaddr = [] - if "packages-next" in csvURL: - packagesCsvURL = csvURL.replace( + if "packages-next" in csvaddr: + pcsvaddr = csvaddr.replace( 'packages-next', 'csv-next') + 'remotePackagesPre.csv' - descriptionsCsvURL = csvURL.replace( + dcsvaddr = csvaddr.replace( 'packages-next', 'csv-next') + 'remoteDescriptionsPre.csv' else: - packagesCsvURL = csvURL.replace( + pcsvaddr = csvaddr.replace( 'packages', 'csv') + 'remotePackagesPre.csv' - descriptionsCsvURL = csvURL.replace( + dcsvaddr = csvaddr.replace( 'packages', 'csv') + 'remoteDescriptionsPre.csv' - return packagesCsvURL, descriptionsCsvURL + return pcsvaddr, dcsvaddr def systemBranch(): diff --git a/src/backend/syncdb.py b/src/backend/syncdb.py index 2dee634..8ada61e 100644 --- a/src/backend/syncdb.py +++ b/src/backend/syncdb.py @@ -10,13 +10,13 @@ import sisyphus.getfs def remoteCSV(): - packagesCsvURL, descriptionsCsvURL = sisyphus.getenv.csvURL() + pcsvaddr, dcsvaddr = sisyphus.getenv.csvaddr() http = urllib3.PoolManager() - with http.request('GET', packagesCsvURL, preload_content=False) as tmp_buffer, open(sisyphus.getfs.remotePackagesCsv, 'wb') as output_file: + with http.request('GET', pcsvaddr, preload_content=False) as tmp_buffer, open(sisyphus.getfs.remotePackagesCsv, 'wb') as output_file: shutil.copyfileobj(tmp_buffer, output_file) - with http.request('GET', descriptionsCsvURL, preload_content=False) as tmp_buffer, open(sisyphus.getfs.remoteDescriptionsCsv, 'wb') as output_file: + with http.request('GET', dcsvaddr, preload_content=False) as tmp_buffer, open(sisyphus.getfs.remoteDescriptionsCsv, 'wb') as output_file: shutil.copyfileobj(tmp_buffer, output_file) |