再简化一个desc
This commit is contained in:
parent
6e0df4b25b
commit
371bf64a5f
@ -21,17 +21,6 @@ BuildRequires: python3-setuptools
|
|||||||
%description -n python3-retrying
|
%description -n python3-retrying
|
||||||
Retrying is an Apache 2.0 licensed general-purpose retrying library, written in
|
Retrying is an Apache 2.0 licensed general-purpose retrying library, written in
|
||||||
Python, to simplify the task of adding retry behavior to just about anything.
|
Python, to simplify the task of adding retry behavior to just about anything.
|
||||||
The simplest use case is retrying a flaky function whenever an Exception occurs
|
|
||||||
until a value is returned.
|
|
||||||
import random
|
|
||||||
from retrying import retry
|
|
||||||
@retry
|
|
||||||
def do_something_unreliable():
|
|
||||||
if random.randint(0, 10) > 1:
|
|
||||||
raise IOError("Broken sauce, everything is hosed!!!111one")
|
|
||||||
else:
|
|
||||||
return "Awesome sauce!"
|
|
||||||
print do_something_unreliable()
|
|
||||||
|
|
||||||
%package help
|
%package help
|
||||||
Summary: Development documents and examples for retrying
|
Summary: Development documents and examples for retrying
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user