summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/osc.spec2
-rw-r--r--packaging/retry-for-empty-xml-response.patch32
2 files changed, 0 insertions, 34 deletions
diff --git a/packaging/osc.spec b/packaging/osc.spec
index 9c1821c..81e972b 100644
--- a/packaging/osc.spec
+++ b/packaging/osc.spec
@@ -8,7 +8,6 @@ Group: Development/Tools/Other
License: GPL v2 or later
Url: http://www.gitorious.org/opensuse/osc
Source: osc-%{version}.tar.gz
-Patch0: retry-for-empty-xml-response.patch
BuildArch: noarch
BuildRequires: python-devel
@@ -40,7 +39,6 @@ introduction.
%prep
%setup -q
-%patch0 -p1
%build
CFLAGS="%{optflags}" \
diff --git a/packaging/retry-for-empty-xml-response.patch b/packaging/retry-for-empty-xml-response.patch
deleted file mode 100644
index 7c45449..0000000
--- a/packaging/retry-for-empty-xml-response.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/osc/core.py b/osc/core.py
-index 410081a..7d49281 100644
---- a/osc/core.py
-+++ b/osc/core.py
-@@ -1406,9 +1406,25 @@ class Package:
- store_write_string(self.absdir, '_files', meta + '\n')
-
- def get_files_meta(self, revision='latest', skip_service=True):
-- fm = show_files_meta(self.apiurl, self.prjname, self.name, revision=revision, meta=self.meta)
-+ from time import sleep
-+
-+ retry_count = 3
-+ while retry_count > 0:
-+ fm = show_files_meta(self.apiurl, self.prjname, self.name,
-+ revision=revision, meta=self.meta)
-+ try:
-+ root = ET.fromstring(fm)
-+ break
-+ except:
-+ print 'corrupted or empty obs server response ,retrying ...'
-+ sleep(1)
-+ retry_count -= 1
-+
-+ if not retry_count:
-+ # all the re-try failed, abort
-+ raise oscerr.OscIOError(None, 'cannet fetch files meta xml from server')
-+
- # look for "too large" files according to size limit and mark them
-- root = ET.fromstring(fm)
- for e in root.findall('entry'):
- size = e.get('size')
- if size and self.size_limit and int(size) > self.size_limit \