equal
deleted
inserted
replaced
355 |
355 |
356 def __init__(self, ui): |
356 def __init__(self, ui): |
357 try: |
357 try: |
358 import MySQLdb as mysql |
358 import MySQLdb as mysql |
359 bzmysql._MySQLdb = mysql |
359 bzmysql._MySQLdb = mysql |
360 except ImportError, err: |
360 except ImportError as err: |
361 raise util.Abort(_('python mysql support not available: %s') % err) |
361 raise util.Abort(_('python mysql support not available: %s') % err) |
362 |
362 |
363 bzaccess.__init__(self, ui) |
363 bzaccess.__init__(self, ui) |
364 |
364 |
365 host = self.ui.config('bugzilla', 'host', 'localhost') |
365 host = self.ui.config('bugzilla', 'host', 'localhost') |
908 bugs = bz.find_bugs(ctx) |
908 bugs = bz.find_bugs(ctx) |
909 if bugs: |
909 if bugs: |
910 for bug in bugs: |
910 for bug in bugs: |
911 bz.update(bug, bugs[bug], ctx) |
911 bz.update(bug, bugs[bug], ctx) |
912 bz.notify(bugs, util.email(ctx.user())) |
912 bz.notify(bugs, util.email(ctx.user())) |
913 except Exception, e: |
913 except Exception as e: |
914 raise util.Abort(_('Bugzilla error: %s') % e) |
914 raise util.Abort(_('Bugzilla error: %s') % e) |