--- a/mercurial/hgweb/hgweb_mod.py Fri Jul 13 08:28:57 2007 -0700
+++ b/mercurial/hgweb/hgweb_mod.py Fri Jul 06 12:02:43 2007 +0200
@@ -64,7 +64,7 @@
class hgweb(object):
def __init__(self, repo, name=None):
- if type(repo) == type(""):
+ if isinstance(repo, str):
self.repo = hg.repository(ui.ui(report_untrusted=False), repo)
else:
self.repo = repo
--- a/tests/coverage.py Fri Jul 13 08:28:57 2007 -0700
+++ b/tests/coverage.py Fri Jul 06 12:02:43 2007 +0200
@@ -504,7 +504,7 @@
def get_suite_spots(self, tree, spots):
import symbol, token
for i in range(1, len(tree)):
- if type(tree[i]) == type(()):
+ if isinstance(tree[i], tuple):
if tree[i][0] == symbol.suite:
# Found a suite, look back for the colon and keyword.
lineno_colon = lineno_word = None