aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Fincham <michael@hotplate.co.nz>2018-02-11 13:43:09 +1300
committerGitHub <noreply@github.com>2018-02-11 13:43:09 +1300
commitb79e72b246adb98215ec2950c70cc9ca232780cb (patch)
treed80768e76c9348e680d133abc99ae945de753071
parentd6fed89c148bd08936942690f17ce14f4421d7df (diff)
downloadadvisory-feeds-b79e72b246adb98215ec2950c70cc9ca232780cb.tar.gz
advisory-feeds-b79e72b246adb98215ec2950c70cc9ca232780cb.tar.bz2
advisory-feeds-b79e72b246adb98215ec2950c70cc9ca232780cb.zip
Quick fix for Debian migrating to Salsa and retiring subversion
A more complete fix for this which removes the Subversion dependencies will come later.
-rw-r--r--advisories/management/commands/updateadvisories.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/advisories/management/commands/updateadvisories.py b/advisories/management/commands/updateadvisories.py
index 1d205c3..4216037 100644
--- a/advisories/management/commands/updateadvisories.py
+++ b/advisories/management/commands/updateadvisories.py
@@ -86,7 +86,8 @@ class DebianFeed(object):
pass
try:
- advisory_list = self.client.cat(self.list_location).decode('utf-8')
+ r = requests.get('https://salsa.debian.org/security-tracker-team/security-tracker/raw/master/' + self.list_location, timeout=3.1)
+ advisory_list = r.text
with open('%s/list' % self.cache_location, 'w') as advisory_list_file:
advisory_list_file.write(advisory_list)
except ValueError:
@@ -441,5 +442,7 @@ class Command(BaseCommand):
feed = UbuntuFeed()
feed.update_local_database()
+
with open("%s/advisory_cache/timestamp" % settings.BASE_DIR, 'w') as timestamp:
timestamp.write(str(int(time.time())))
+