Skip to content

Commit 05a3f74

Browse files
committed
(API) Cleaned up the way upload_flow was implemented.
1 parent 4334f14 commit 05a3f74

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

openml/apiconnector.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -939,11 +939,7 @@ def upload_flow(self, description, source_file_path=None):
939939
"""
940940
try:
941941
data = {'description': description}
942-
file_dictionary = None
943-
944-
if(source_file_path != None):
945-
file_dictionary={'source': source_file_path}
946-
942+
file_dictionary = {'source': source_file_path} if source_file_path is not None else None
947943
return_code, dataset_xml = self._perform_api_call("/flow/", data=data, file_dictionary=file_dictionary)
948944

949945
except URLError as e:

0 commit comments

Comments
 (0)