Skip to content

Commit

Permalink
Merge pull request #76 from NatLibFi/fix-py3-open-instead-of-file
Browse files Browse the repository at this point in the history
Use open() instead of file() to read SPARQL query files
  • Loading branch information
osma committed Oct 20, 2020
2 parents cc44847 + 9275acf commit 7e169d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skosify/skosify.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def transform_sparql_update(rdf, update_query):
logging.debug("performing SPARQL Update transformation")

if update_query[0] == '@': # actual query should be read from file
update_query = file(update_query[1:]).read()
update_query = open(update_query[1:]).read()

logging.debug("update query: %s", update_query)
rdf.update(update_query)
Expand All @@ -223,7 +223,7 @@ def transform_sparql_construct(rdf, construct_query):
logging.debug("performing SPARQL CONSTRUCT transformation")

if construct_query[0] == '@': # actual query should be read from file
construct_query = file(construct_query[1:]).read()
construct_query = open(construct_query[1:]).read()

logging.debug("CONSTRUCT query: %s", construct_query)

Expand Down

0 comments on commit 7e169d8

Please sign in to comment.