Skip to content

Commit 009ccf9

Browse files
authored
Merge pull request #3642 from OpenNeuroOrg/fix/dev-github-disabled
fix(dev): Don't crash on exports with GitHub intentionally disabled
2 parents 25ee4ad + 3ea1777 commit 009ccf9

File tree

1 file changed

+1
-7
lines changed
  • services/datalad/datalad_service/common

1 file changed

+1
-7
lines changed

services/datalad/datalad_service/common/github.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,8 @@
1212
def create_github_repo(dataset_path, dataset_id):
1313
"""Setup a github sibling / remote."""
1414
try:
15-
# raise exception if github exports are not enabled
1615
if not DATALAD_GITHUB_EXPORTS_ENABLED:
17-
raise Exception(
18-
'DATALAD_GITHUB_EXPORTS_ENABLED must be defined to create remote repos'
19-
)
20-
21-
# this adds github remote to config and also creates repo
22-
return create_sibling_github(dataset_path, dataset_id)
16+
return create_sibling_github(dataset_path, dataset_id)
2317
except KeyError:
2418
raise Exception(
2519
'DATALAD_GITHUB_TOKEN and DATALAD_GITHUB_ORG must be defined to create remote repos'

0 commit comments

Comments
 (0)