##// END OF EJS Templates
bugzilla: move from dict() construction to {} literals...
Augie Fackler -
r20673:37cde285 default
parent child Browse files
Show More
@@ -620,7 +620,7 b' class bzxmlrpc(bzaccess):'
620 ver = self.bzproxy.Bugzilla.version()['version'].split('.')
620 ver = self.bzproxy.Bugzilla.version()['version'].split('.')
621 self.bzvermajor = int(ver[0])
621 self.bzvermajor = int(ver[0])
622 self.bzverminor = int(ver[1])
622 self.bzverminor = int(ver[1])
623 self.bzproxy.User.login(dict(login=user, password=passwd))
623 self.bzproxy.User.login({'login': user, 'password': passwd})
624
624
625 def transport(self, uri):
625 def transport(self, uri):
626 if urlparse.urlparse(uri, "http")[0] == "https":
626 if urlparse.urlparse(uri, "http")[0] == "https":
@@ -630,13 +630,15 b' class bzxmlrpc(bzaccess):'
630
630
631 def get_bug_comments(self, id):
631 def get_bug_comments(self, id):
632 """Return a string with all comment text for a bug."""
632 """Return a string with all comment text for a bug."""
633 c = self.bzproxy.Bug.comments(dict(ids=[id], include_fields=['text']))
633 c = self.bzproxy.Bug.comments({'ids': [id],
634 'include_fields': ['text']})
634 return ''.join([t['text'] for t in c['bugs'][str(id)]['comments']])
635 return ''.join([t['text'] for t in c['bugs'][str(id)]['comments']])
635
636
636 def filter_real_bug_ids(self, bugs):
637 def filter_real_bug_ids(self, bugs):
637 probe = self.bzproxy.Bug.get(dict(ids=sorted(bugs.keys()),
638 probe = self.bzproxy.Bug.get({'ids': sorted(bugs.keys()),
638 include_fields=[],
639 'include_fields': [],
639 permissive=True))
640 'permissive': True,
641 })
640 for badbug in probe['faults']:
642 for badbug in probe['faults']:
641 id = badbug['id']
643 id = badbug['id']
642 self.ui.status(_('bug %d does not exist\n') % id)
644 self.ui.status(_('bug %d does not exist\n') % id)
@@ -717,10 +719,10 b' class bzxmlrpcemail(bzxmlrpc):'
717 than the subject line, and leave a blank line after it.
719 than the subject line, and leave a blank line after it.
718 '''
720 '''
719 user = self.map_committer(committer)
721 user = self.map_committer(committer)
720 matches = self.bzproxy.User.get(dict(match=[user]))
722 matches = self.bzproxy.User.get({'match': [user]})
721 if not matches['users']:
723 if not matches['users']:
722 user = self.ui.config('bugzilla', 'user', 'bugs')
724 user = self.ui.config('bugzilla', 'user', 'bugs')
723 matches = self.bzproxy.User.get(dict(match=[user]))
725 matches = self.bzproxy.User.get({'match': [user]})
724 if not matches['users']:
726 if not matches['users']:
725 raise util.Abort(_("default bugzilla user %s email not found") %
727 raise util.Abort(_("default bugzilla user %s email not found") %
726 user)
728 user)
General Comments 0
You need to be logged in to leave comments. Login now