Skip to content

Commit

Permalink
fix: update modernisers to skip repo if file not found (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
UsamaSadiq authored Feb 22, 2024
1 parent 6b070b4 commit 07a5239
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion edx_repo_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

__version__ = '0.8.3'
__version__ = '0.8.4'
7 changes: 5 additions & 2 deletions edx_repo_tools/codemods/python312/gh_actions_modernizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ def modernize(self):
'--path', default='.github/workflows/ci.yml',
help="Path to default CI workflow file")
def main(path):
modernizer = GithubCIModernizer(path)
modernizer.modernize()
if os.path.exists(path):
modernizer = GithubCIModernizer(path)
modernizer.modernize()
else:
print("ci.yml not found on specified path")


if __name__ == '__main__':
Expand Down
7 changes: 5 additions & 2 deletions edx_repo_tools/codemods/python312/tox_modernizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,11 @@ def modernize(self):
'--path', default='tox.ini',
help="Path to target tox config file")
def main(path):
modernizer = ConfigReader(path).get_modernizer()
modernizer.modernize()
if os.path.exists(path):
modernizer = ConfigReader(path).get_modernizer()
modernizer.modernize()
else:
print("tox.ini not found on specified path")


if __name__ == '__main__':
Expand Down

0 comments on commit 07a5239

Please sign in to comment.