From 5e7d778250e9684ecd3cee2b5daaf9885f95245c Mon Sep 17 00:00:00 2001 From: Zhang Qiang Date: Fri, 7 Sep 2012 12:40:59 +0800 Subject: [PATCH] fix reference undefined var backtrace issue Change-Id: I3509afc223c211449ddee62a9482d7cc955b0a34 --- gitbuildsys/oscapi.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gitbuildsys/oscapi.py b/gitbuildsys/oscapi.py index 5b6c73a..57fa361 100644 --- a/gitbuildsys/oscapi.py +++ b/gitbuildsys/oscapi.py @@ -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)) -- 2.7.4