Skip to content

Commit

Permalink
Fix type of error and py2/3 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cokelaer committed May 17, 2016
1 parent 17c1c28 commit 64109b5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions easydev/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ def execute(cmd, showcmd=True, verbose=True):
line = p.readline()
while line:
if verbose:
sys.stdout.write(line.decode())
try:
sys.stdout.write(line.decode())
except:
sys.stdout.write(line)

sys.stdout.flush()
line = p.readline()

Expand Down Expand Up @@ -295,7 +299,7 @@ def to_json(self, dictionary):
def mkdir(self, dirname):
try:
os.mkdir(dirname)
except FileExistsError:
except OSError:
pass # exists already
except Exception as err:
raise(err)
Expand Down

0 comments on commit 64109b5

Please sign in to comment.