Skip to content

Commit

Permalink
[#104] Supply username and password for virtuoso
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjwebb committed Sep 10, 2015
1 parent 67cb937 commit f05d8b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cove/dataload/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ def put_to_virtuoso(dataset, staging):
# )

# We're using shell=True here (and running virutoso SQL directly!), so must
# trust prefix and graphuri. The only outside input to this is the pk used
# to construct graphuri, which is not user editable. We must ensure this
# continues to be the case.
# trust prefix, graphuri and DBA_PASS. The only outside input to this are
# DBA_PASS the pk used to construct graphuri, which are not user editable.
# We must ensure this continues to be the case.
subprocess.check_call('''
echo "DB.DBA.RDF_GRAPH_GROUP_INS('http://{}resourceprojects.org/data/', '{}');" | isql virtuoso \
'''.format(prefix, graphuri), shell=True)
echo "DB.DBA.RDF_GRAPH_GROUP_INS('http://{}resourceprojects.org/data/', '{}');" | isql virtuoso dba {} \
'''.format(prefix, graphuri, os.environ['DBA_PASS']), shell=True)


def run_process(request, pk, process_type):
Expand Down

0 comments on commit f05d8b9

Please sign in to comment.