From ead76c3528f6223de9ef03acdd7b06c6025b1391 Mon Sep 17 00:00:00 2001 From: Jared Whiklo Date: Wed, 14 Dec 2016 19:32:51 -0600 Subject: [PATCH 1/2] Use auth with parse --- verify.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/verify.py b/verify.py index bd995a5..838cd81 100755 --- a/verify.py +++ b/verify.py @@ -203,7 +203,9 @@ def __init__(self, inputpath, config, logger): else: self.type = 'rdf' self.destpath = quote((config.dir + self.relpath + config.ext)) - self.graph = Graph().parse(self.origpath) + response = requests.get(self.origpath, auth=config.auth) + if response.statuscode == 200: + self.graph = Graph().parse(data=response.text, format="text/turtle") # handle binary resources on disk elif (self.origpath.startswith(config.dir) and From 1da20e282e01e7880eb670f6b3195b46272261cc Mon Sep 17 00:00:00 2001 From: Jared Whiklo Date: Wed, 14 Dec 2016 22:04:21 -0600 Subject: [PATCH 2/2] Misspelled attribute --- verify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/verify.py b/verify.py index 838cd81..ca8b524 100755 --- a/verify.py +++ b/verify.py @@ -204,7 +204,7 @@ def __init__(self, inputpath, config, logger): self.type = 'rdf' self.destpath = quote((config.dir + self.relpath + config.ext)) response = requests.get(self.origpath, auth=config.auth) - if response.statuscode == 200: + if response.status_code == 200: self.graph = Graph().parse(data=response.text, format="text/turtle") # handle binary resources on disk