Skip to content

Commit f83307f

Browse files
committed
Fixed merge conflict
1 parent 30aa28e commit f83307f

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

openml/apiconnector.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -840,12 +840,12 @@ def _read_url(self, url, add_authentication=False, data=None, filePath=None):
840840
if not url.endswith("/"):
841841
url += "/"
842842
url += call
843-
return self._read_url(url, data=data)
843+
return self._read_url(url, data=data,filePath= filePath)
844844

845-
def _read_url(self, url, data=None):
845+
def _read_url(self, url, data=None, filePath=None):
846846
if data is None:
847847
data = {}
848-
data['session_hash'] = self.config.get('FAKE_SECTION', 'apikey')
848+
data['session_hash'] = self.config.get('FAKE_SECTION', 'apikey')
849849

850850
if filePath is not None:
851851
if os.path.isabs(filePath):
@@ -910,7 +910,7 @@ def _read_url(self, url, data=None):
910910
def upload_dataset(self, description, filePath=None):
911911
try:
912912
data = {'description': description}
913-
return_code, dataset_xml = self._perform_api_call("openml.data.upload",data=data, filePath = filePath)
913+
return_code, dataset_xml = self._perform_api_call("/data/",data=data, filePath=filePath)
914914

915915
except URLError as e:
916916
# TODO logger.debug

tests/test_apiconnector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def test_upload_dataset(self):
236236
<oml:md5_checksum></oml:md5_checksum>
237237
</oml:data_set_description>
238238
"""
239-
return_code, dataset_xml = self.connector.upload_dataset (description, filePath)
239+
return_code, dataset_xml = self.connector.upload_dataset(description, filePath)
240240
self.assertEqual(return_code, 200)
241241

242242
def test_upload_dataset_with_url(self):

0 commit comments

Comments
 (0)