fix reference undefined var backtrace issue
authorZhang Qiang <qiang.z.zhang@intel.com>
Fri, 7 Sep 2012 04:40:59 +0000 (12:40 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Fri, 7 Sep 2012 05:56:16 +0000 (13:56 +0800)
Change-Id: I3509afc223c211449ddee62a9482d7cc955b0a34

gitbuildsys/oscapi.py

index 5b6c73a210ebc9d7db1d5ee6e3d663df14983891..57fa361bd152132ef4646370a7754441a1c77c7f 100644 (file)
@@ -74,13 +74,11 @@ class OSC(object):
         # Usually next try succeeds, so let's try 3 times
         for count in (1, 2, 3):
             try:
-                result = method(url, data=data, file=filep)
+                return method(url, data=data, file=filep)
             except (urllib2.URLError, M2Crypto.m2urllib2.URLError,
                     M2Crypto.SSL.SSLError, ssl.SSLError), err:
                 if count == 3:
                     raise OSCError(str(err))
-            if result:
-                return result
 
         raise OSCError('Got empty responce from %s %s' % \
                        (method.func_name.split('_')[-1], url))