[master 7/8] Use isinstance instead of type.
clumens
installerbot-noreply at redhat.com
Thu Jul 16 19:58:07 UTC 2015
From: Chris Lumens <clumens at redhat.com>
---
meh/dump.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meh/dump.py b/meh/dump.py
index cac3878..9a9db09 100644
--- a/meh/dump.py
+++ b/meh/dump.py
@@ -280,7 +280,7 @@ def _format_stack(self):
frames = []
for (_frame, fn, lineno, func, ctx, _idx) in self.stack:
- if type(ctx) == type([]):
+ if isinstance(ctx, list):
code = "".join(ctx)
else:
code = ctx
@@ -510,7 +510,7 @@ def hash(self):
if self.stack:
for (file, _lineno, func, text) in [f[1:5] for f in self.stack]:
- if type(text) == type([]):
+ if isinstance(text, list):
text = "".join(text)
s += "%s %s %s\n" % (os.path.basename(file), func, text)
else:
--
To view this commit on github, visit https://github.com/rhinstaller/python-meh/commit/0939f1e4491c567b506b2256a2ec6acade319e3f
More information about the anaconda-patches
mailing list