Skip to content

Commit

Permalink
fixed bug whereby checkout failed if no .gitattributes exists
Browse files Browse the repository at this point in the history
  • Loading branch information
dmalan committed Jul 30, 2017
1 parent bbd95db commit d3e2b18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ class CustomInstall(install):
"console_scripts": ["submit50=submit50:main"]
},
url="https://github.com/cs50/submit50",
version="2.4.0"
version="2.4.1"
)
5 changes: 4 additions & 1 deletion submit50.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,10 @@ def submit(org, problem):
if os.path.isfile(".gitattributes"):
submit.ATTRIBUTES = ".gitattributes.{}".format(round(time.time()))
os.rename(".gitattributes", submit.ATTRIBUTES)
run("git checkout --force {} .gitattributes".format(branch))
try:
run("git checkout --force {} .gitattributes".format(branch))
except Exception:
pass

# set options
tag = "{}@{}".format(branch, timestamp)
Expand Down

0 comments on commit d3e2b18

Please sign in to comment.