Mailinglist Archive: opensuse-buildservice (311 mails)

< Previous Next >
Re: [opensuse-buildservice] [patch] [osc] Fallback to plain file, if cpio download isn't available.
  • From: Marcus Hüwe <suse-tux@xxxxxx>
  • Date: Mon, 9 Nov 2009 19:54:35 +0100
  • Message-id: <20091109185435.GB3339@xxxxxxxxxxxxxxxxxxxxxx>
On 2009-11-09 19:37:13 +0100, Jan-Simon Möller wrote:
Am Montag 09 November 2009 19:25:53 schrieb Marcus Hüwe:
On 2009-11-09 15:20:02 +0100, Jan-Simon Möller wrote:
Hi !

The new cpio file query needs a fallback option in case of the api being
an _old_ api .
This is really needed - just think of migration scenarios and for
backward compatibility.

It seems you're using a _really old_ API:)

No, i got an error with an api of rev.8836 and also with an slightly older
version. So I wouldn't consider them "old" - anyway, a fallback doesn't hurt.

Hmm do you remember the error? The API supports this for a long time (e.g.
remote obs instances use the same "trick" to fetch the packages).

I hacked up a patch and would like to append it for comments from our osc
experts.

The patch itself looks ok to me but it breaks python24 compatibility. The
"except" has to be nested into an inner try statement:
try:
try:
<old code>
except URLGrabError, e:
<your code>
finally:
<old code>

Hehe, then I did it right in the first place, but "beautified" the code too
much.
Yes a try-except-finally is much nicer to read but there are still some people
who
use python24.

I'll commit a version with nesting then.

Thanks


Marcus
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >