aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/diff.py
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/diff.py')
-rw-r--r--libbe/diff.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/libbe/diff.py b/libbe/diff.py
index c2f4e68..c2f9c8e 100644
--- a/libbe/diff.py
+++ b/libbe/diff.py
@@ -99,7 +99,7 @@ class Subscription (object):
kwargs['type_root'] = BUGDIR_TYPE_ALL
else:
kwargs['type_root'] = BUG_TYPE_ALL
- if type(subscription_type) in types.StringTypes:
+ if type(subscription_type) in (str,):
subscription_type = type_from_name(subscription_type, **kwargs)
self.id = id
self.type = subscription_type
@@ -221,8 +221,8 @@ class DiffTree (libbe.util.tree.Tree):
if names[1] == child.name:
return child.child_by_path(names[1:])
if len(names) == 1:
- raise KeyError, "%s doesn't match '%s'" % (names, self.name)
- raise KeyError, '%s points to child not in %s' % (names, [c.name for c in self])
+ raise KeyError("%s doesn't match '%s'" % (names, self.name))
+ raise KeyError('%s points to child not in %s' % (names, [c.name for c in self]))
def report_string(self):
report = self.report()
if report == None:
@@ -649,10 +649,10 @@ class Diff (object):
def attribute_change_string(self, attribute_changes, indent=0):
indent_string = ' '*indent
- change_strings = [u'%s: %s -> %s' % f for f in attribute_changes]
+ change_strings = ['%s: %s -> %s' % f for f in attribute_changes]
for i,change_string in enumerate(change_strings):
change_strings[i] = indent_string+change_string
- return u'\n'.join(change_strings)
+ return '\n'.join(change_strings)
def bugdir_attribute_change_string(self, attribute_changes):
return 'Changed bug directory settings:\n%s' % \
self.attribute_change_string(attribute_changes, indent=1)