Raise OSCError in oscapi.py::OSC::core_http instead of ObsError.
authorHuang Hao <hao.h.huang@intel.com>
Tue, 21 Aug 2012 13:11:39 +0000 (21:11 +0800)
committerHuang Hao <hao.h.huang@intel.com>
Thu, 23 Aug 2012 03:37:18 +0000 (11:37 +0800)
Error message print out to console is incomplete since ObsError
can't be catched by methods in oscapi.py and throw directly to
cmd_remotebuild.py.

Change-Id: I2879ef2ab7f60f3f0caa35b081c9408ac6589527

gitbuildsys/oscapi.py

index 249517b..785d815 100644 (file)
@@ -72,7 +72,7 @@ class OSC(object):
             return method(url, data=data, file=filep)
         except (urllib2.URLError, M2Crypto.m2urllib2.URLError,
                 M2Crypto.SSL.SSLError, ssl.SSLError), err:
-            raise errors.ObsError(str(err))
+            raise OSCError(str(err))
 
     def copy_project(self, src, target, rewrite=False):
         """