Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller
pybugz
pybugz-0.6.11-novellbugzilla.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pybugz-0.6.11-novellbugzilla.patch of Package pybugz
Index: pybugz-0.6.11/bugz.py =================================================================== --- pybugz-0.6.11.orig/bugz.py 2006-09-02 14:35:37.000000000 +0200 +++ pybugz-0.6.11/bugz.py 2006-11-09 11:58:54.000000000 +0100 @@ -226,6 +226,8 @@ class BugzConfig: } + use_emerge = False + import csv import os import re @@ -244,7 +246,7 @@ from cookielib import LWPCookieJar, Cook # # Global configuration # - +#exec(open('NovellBugzConfig.py').read()) try: config except NameError: @@ -578,12 +580,13 @@ class Bugz: self.cookiejar.load() self.cookiejar.clear() self.cookiejar.save() - os.chmod(self.cookiejar.filename, 0700) + os.chmod(self.cookiejar.filename, 0600) except IOError: pass except KeyError: self.warn('Unable to save session cookies in %s' % cookie_file) self.cookiejar = CookieJar(cookie_file) + self.cookiejar.load() self.opener = build_opener(HTTPCookieProcessor(self.cookiejar)) self.user = user @@ -781,6 +784,7 @@ class Bugz: etree = ElementTree.parse(fd, parser) bug = etree.find('.//bug') if bug and bug.attrib.has_key('error'): + print bug.attrib['error'] return None else: return etree @@ -1089,7 +1093,7 @@ class Bugz: class PrettyBugz(Bugz): options = { 'base': make_option('-b', '--base', type='string', - default = 'http://bugs.gentoo.org/', + default = 'https://bugzilla.novell.com/', help = 'Base URL of Bugzilla'), 'user': make_option('-u', '--user', type='string', help = 'Username for commands requiring authentication'), @@ -1178,7 +1182,7 @@ class PrettyBugz(Bugz): for row in result: assignee = row['assignee'].split('@')[0] - desc = row['desc'][:self.columns - 30] + desc = row.get('desc', 'no desc')[:self.columns - 30] print '%7s %-20s %s' % (row['bugid'], assignee, desc) search.args = "<search term> [options..]" @@ -1288,7 +1292,10 @@ class PrettyBugz(Bugz): i = 0 wrapper = textwrap.TextWrapper(width = self.columns) for comment in bug_comments: - who = comment.find('.//who').text.encode(self.enc) + try: + who = comment.find('.//who').text + except: + who = '<email hidden>' when = comment.find('.//bug_when').text.encode(self.enc) what = comment.find('.//thetext').text i += 1 @@ -1364,12 +1371,12 @@ class PrettyBugz(Bugz): print description print '-' * (self.columns - 1) - if emerge_info == None: + if config.use_emerge and emerge_info == None: ask_emerge = raw_input('Include output of emerge --info (Y/n)?') if ask_emerge[0] in ('y', 'Y'): emerge_info = True - if emerge_info: + if config.use_emerge and emerge_info: import commands emerge_info_output = commands.getoutput('%s --info' % EMERGE) description = description + '\n' + emerge_info_output
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor