Skip to content

Commit

Permalink
Merge pull request #1 from Aplopio/futurize
Browse files Browse the repository at this point in the history
Futurize for py2/3 compatibility
  • Loading branch information
nraval1729 authored Oct 10, 2019
2 parents 59b767c + d88b5ef commit 6dbea31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rbox_htmldiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def textDiff(a, b, ins_attrs=None, del_attrs=None):
elif e[0] == "equal":
out.append(''.join(b[e[3]:e[4]]))
else:
raise "Um, something's broken. I didn't expect a '" + `e[0]` + "'."
raise "Um, something's broken. I didn't expect a '" + repr(e[0]) + "'."
return ''.join(out)

def html2list(x, b=0):
Expand All @@ -59,4 +59,4 @@ def html2list(x, b=0):
elif c in string.whitespace: out.append(cur+c); cur = ''
else: cur += c
out.append(cur)
return filter(lambda x: x is not '', out)
return [x for x in out if x is not '']
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from setuptools import setup
setup(
name='rbox_htmldiff',
version='0.0.2',
version='0.0.3',
py_modules=['rbox_htmldiff', ],
install_requires=[
# -*- Extra requirements: -*-
Expand Down

0 comments on commit 6dbea31

Please sign in to comment.