Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 850027 Details for
Bug 1052321
traceback on empty results.xml file
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch for specific message for zero-length files.
0002-1022749-traceback-on-empty-results.xml-file.patch (text/plain), 1.61 KB, created by
Greg Nichols
on 2014-01-14 16:20:35 UTC
(
hide
)
Description:
patch for specific message for zero-length files.
Filename:
MIME Type:
Creator:
Greg Nichols
Created:
2014-01-14 16:20:35 UTC
Size:
1.61 KB
patch
obsolete
>From b6706fdbc55975033ff7b3611e4d4cec608be941 Mon Sep 17 00:00:00 2001 >From: Greg Nichols <gnichols@redhat.com> >Date: Tue, 14 Jan 2014 11:18:42 -0500 >Subject: [PATCH 2/2] 1022749 - traceback on empty results.xml file > >--- > hwcert/documentbase.py | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/hwcert/documentbase.py b/hwcert/documentbase.py >index 8ef1dc2..7205f54 100644 >--- a/hwcert/documentbase.py >+++ b/hwcert/documentbase.py >@@ -257,10 +257,10 @@ class DocumentBase(DocumentWrapper): > # add the style sheet processing instruction > stylesheet = self.document.createProcessingInstruction("xml-stylesheet", "href=\"%s\" type=\"text/css\"" % stylesheet) > self.document.insertBefore(stylesheet, topElement) >- >- >+ > def load(self, filename): > self.loadedFilePath = filename >+ self.loadedFileSize = 0 > if filename[-2:] == "gz": > file = gzip.open(filename, 'rb') > self.loadedFileSize = os.path.getsize(self.loadedFilePath) >@@ -271,14 +271,17 @@ class DocumentBase(DocumentWrapper): > pass > file = open(filename, "r") > try: >- self.document = parse(file) >+ if self.loadedFileSize: >+ self.document = parse(file) >+ else: >+ print "Error: %s has a size of 0" % filename > except Exception, e: > print "Error: could not parse %s" % filename > print e > self.document = None > > file.close() >- >+ > def save(self, filename): > file = open(filename, "w") > try: >-- >1.8.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1052321
:
850025
| 850027