Skip to content
Snippets Groups Projects
Commit 94dbeddb authored by Nick Lee's avatar Nick Lee
Browse files

fix directory not existing

parent e1aaca5d
No related branches found
No related tags found
No related merge requests found
...@@ -194,9 +194,11 @@ for url in urls: ...@@ -194,9 +194,11 @@ for url in urls:
subprocess.call(['git', 'clone', url]) subprocess.call(['git', 'clone', url])
if revert_to_date: if revert_to_date:
username = url2reponame(url) username = url2reponame(url)
print("> Reverting master branch to date %s in folder %s." % (revert_to_date, os.path.abspath(os.curdir)))
if not os.path.isdir(username + "/.git"):
continue
os.chdir(username)
try: try:
print("> Reverting master branch to date %s in folder %s." % (revert_to_date, os.path.abspath(os.curdir)))
os.chdir(username)
# First grab the student's latest work on master branch # First grab the student's latest work on master branch
retcode1 = subprocess.call('git checkout master'.split()) retcode1 = subprocess.call('git checkout master'.split())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment