From: Zhang Qiang Date: Wed, 24 Oct 2012 13:03:27 +0000 (+0800) Subject: fix backtrace while trying to remove 'None' file, #490 X-Git-Tag: 0.11~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c8fddf2dd191224186d6b4f9a7c8f611538c162;p=tools%2Fgbs.git fix backtrace while trying to remove 'None' file, #490 Change-Id: I7d1b7c3701fb9e36006b7f88a9248feb4bcd4060 --- diff --git a/gitbuildsys/oscapi.py b/gitbuildsys/oscapi.py index 630bb23..692536a 100644 --- a/gitbuildsys/oscapi.py +++ b/gitbuildsys/oscapi.py @@ -210,6 +210,8 @@ class OSC(object): fnames = [entry.get('name') for entry in \ core.ET.fromstring(responce)] for fname in fnames: + if fname is None: + continue query = 'rev=upload' url = core.makeurl(self.apiurl, ['source', prj, pkg, pathname2url(fname)], @@ -217,8 +219,8 @@ class OSC(object): try: self.core_http(core.http_DELETE, url) except OSCError, err: - raise ObsError("can\'t remove files from %s/%s: %s" \ - % (prj, pkg, err)) + raise ObsError("can\'t remove file %s/%s/%s: %s" \ + % (prj, pkg, fname, err)) def create_package(self, prj, pkg): """Create package in the project."""