[Bug 280034] New: osc buildinfo has bad error handling
https://bugzilla.novell.com/show_bug.cgi?id=280034 Summary: osc buildinfo has bad error handling Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: BuildService AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: suse-beta@cboltz.de QAContact: adrian@novell.com osc buildinfo has bad error handling. Examples are a) running "osc buildinfo" in a directory that does *not* contain a .osc directory osc buildinfo openSUSE_10.2 x86_64 Traceback (most recent call last): File "/usr/bin/osc", line 10, in <module> sys.exit( osc.main() ) File "/usr/lib/python2.5/site-packages/osc/cmdln.py", line 240, in main return self.cmd(args) File "/usr/lib/python2.5/site-packages/osc/cmdln.py", line 263, in cmd retval = self.onecmd(argv) File "/usr/lib/python2.5/site-packages/osc/cmdln.py", line 379, in onecmd return self._dispatch_cmd(handler, argv) File "/usr/lib/python2.5/site-packages/osc/cmdln.py", line 1109, in _dispatch_cmd return handler(argv[0], opts, *args) File "/usr/lib/python2.5/site-packages/osc/commandline.py", line 968, in do_buildinfo package = store_read_package(wd) File "/usr/lib/python2.5/site-packages/osc/core.py", line 1348, in store_read_package p = open(os.path.join(dir, store, '_package')).readlines()[0].strip() IOError: [Errno 2] No such file or directory: './.osc/_package' b) in case of a "404" error (already reported in another bug) there's also a lengthly message with a backtrace (sorry, I don't have it available right now) Please add some error handling ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=280034 mhorvath@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |poeml@novell.com |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=280034 ------- Comment #1 from suse-beta@cboltz.de 2007-06-02 14:25 MST ------- case b) (404 error) is reproducable by specifying an invalid target ;-) # osc buildinfo openSUSE_10.2 nixmitarch Traceback (most recent call last): File "/usr/bin/osc", line 10, in <module> sys.exit( osc.main() ) File "/usr/lib/python2.5/site-packages/osc/cmdln.py", line 240, in main return self.cmd(args) File "/usr/lib/python2.5/site-packages/osc/cmdln.py", line 263, in cmd retval = self.onecmd(argv) File "/usr/lib/python2.5/site-packages/osc/cmdln.py", line 379, in onecmd return self._dispatch_cmd(handler, argv) File "/usr/lib/python2.5/site-packages/osc/cmdln.py", line 1109, in _dispatch_cmd return handler(argv[0], opts, *args) File "/usr/lib/python2.5/site-packages/osc/commandline.py", line 992, in do_buildinfo print ''.join(get_buildinfo(apiurl, project, package, platform, arch, specfile=spec)) File "/usr/lib/python2.5/site-packages/osc/core.py", line 1285, in get_buildinfo f = http_GET(u) File "/usr/lib/python2.5/site-packages/osc/core.py", line 682, in http_GET def http_GET(*args, **kwargs): return http_request('GET', *args, **kwargs) File "/usr/lib/python2.5/site-packages/osc/core.py", line 673, in http_request fd = urllib2.urlopen(req, data=data) File "/usr/lib/python2.5/urllib2.py", line 121, in urlopen return _opener.open(url, data) File "/usr/lib/python2.5/urllib2.py", line 380, in open response = meth(req, response) File "/usr/lib/python2.5/urllib2.py", line 491, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.5/urllib2.py", line 412, in error result = self._call_chain(*args) File "/usr/lib/python2.5/urllib2.py", line 353, in _call_chain result = func(*args) File "/usr/lib/python2.5/urllib2.py", line 817, in http_error_401 url, req, headers) File "/usr/lib/python2.5/urllib2.py", line 795, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/usr/lib/python2.5/urllib2.py", line 805, in retry_http_basic_auth return self.parent.open(req) File "/usr/lib/python2.5/urllib2.py", line 380, in open response = meth(req, response) File "/usr/lib/python2.5/urllib2.py", line 491, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.5/urllib2.py", line 418, in error return self._call_chain(*args) File "/usr/lib/python2.5/urllib2.py", line 353, in _call_chain result = func(*args) File "/usr/lib/python2.5/urllib2.py", line 499, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 404: Not Found -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=280034 poeml@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=280034#c2
Peter Poeml
https://bugzilla.novell.com/show_bug.cgi?id=280034#c3
--- Comment #3 from Christian Boltz
https://bugzilla.novell.com/show_bug.cgi?id=280034#c4
--- Comment #4 from Marcus Hüwe
https://bugzilla.novell.com/show_bug.cgi?id=280034#c5
--- Comment #5 from Marcus Hüwe
https://bugzilla.novell.com/show_bug.cgi?id=280034#c6
--- Comment #6 from Marcus Hüwe
https://bugzilla.novell.com/show_bug.cgi?id=280034
User suse-tux@gmx.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=280034#c7
Marcus Hüwe
https://bugzilla.novell.com/show_bug.cgi?id=280034
User suse-tux@gmx.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=280034#c8
Marcus Hüwe
https://bugzilla.novell.com/show_bug.cgi?id=280034
User poeml@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=280034#c9
--- Comment #9 from Peter Poeml
https://bugzilla.novell.com/show_bug.cgi?id=280034
User poeml@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=280034#c10
Peter Poeml
https://bugzilla.novell.com/show_bug.cgi?id=280034
User suse-beta@cboltz.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=280034#c11
Christian Boltz
participants (1)
-
bugzilla_noreply@novell.com