Skip to content

Commit

Permalink
Merge pull request #72 from cs50/develop
Browse files Browse the repository at this point in the history
Update to v2.0.5
  • Loading branch information
Kareem Zidane authored Sep 25, 2017
2 parents 0dd0099 + 4db1630 commit 91f8f02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions check50.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import os
import pexpect
import pip
import re
import requests
import shutil
import subprocess
Expand Down Expand Up @@ -536,6 +537,8 @@ def wait(self, timeout=1):
pass
except EOF:
break
except UnicodeDecodeError:
raise Error("output not valid ASCII text")
else:
self.output.append(bytes)
else:
Expand Down Expand Up @@ -661,8 +664,10 @@ def append_code(self, original, codefile):
o.write(code.read())

def replace_fn(self, old_fn, new_fn, filename):
self.spawn("sed -i='' -e 's/callq\t_{}/callq\t_{}/g' {}".format(old_fn, new_fn, filename))
self.spawn("sed -i='' -e 's/callq\t{}/callq\t{}/g' {}".format(old_fn, new_fn, filename))
with open(filename, "r+") as f:
asm = re.sub(r"(callq\t_?){}(?!\w)".format(old_fn), r"\1{}".format(new_fn), f.read())
f.seek(0)
f.write(asm)

def _check_valgrind(self):
"""Log and report any errors encountered by valgrind"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ class CustomInstall(install):
"console_scripts": ["check50=check50:main"]
},
url="https://github.com/cs50/check50",
version="2.0.4"
version="2.0.5"
)

0 comments on commit 91f8f02

Please sign in to comment.