diff options
-rw-r--r-- | rsa/key.py | 2 | ||||
-rw-r--r-- | rsa/parallel.py | 2 | ||||
-rw-r--r-- | rsa/pkcs1.py | 2 | ||||
-rw-r--r-- | rsa/pkcs1_v2.py | 2 | ||||
-rw-r--r-- | rsa/prime.py | 2 | ||||
-rw-r--r-- | rsa/randnum.py | 2 |
6 files changed, 6 insertions, 6 deletions
@@ -783,7 +783,7 @@ if __name__ == '__main__': if failures: break - if (count and count % 10 == 0) or count == 1: + if (count % 10 == 0 and count) or count == 1: print('%i times' % count) except KeyboardInterrupt: print('Aborted') diff --git a/rsa/parallel.py b/rsa/parallel.py index edaf6bc..a3fe312 100644 --- a/rsa/parallel.py +++ b/rsa/parallel.py @@ -95,7 +95,7 @@ if __name__ == '__main__': if failures: break - if count and count % 10 == 0: + if count % 10 == 0 and count: print('%i times' % count) print('Doctests done') diff --git a/rsa/pkcs1.py b/rsa/pkcs1.py index b516cec..84f0e3b 100644 --- a/rsa/pkcs1.py +++ b/rsa/pkcs1.py @@ -433,7 +433,7 @@ if __name__ == '__main__': if failures: break - if count and count % 100 == 0: + if count % 100 == 0 and count: print('%i times' % count) print('Doctests done') diff --git a/rsa/pkcs1_v2.py b/rsa/pkcs1_v2.py index d6d2423..5f9c7dd 100644 --- a/rsa/pkcs1_v2.py +++ b/rsa/pkcs1_v2.py @@ -97,7 +97,7 @@ if __name__ == '__main__': if failures: break - if count and count % 100 == 0: + if count % 100 == 0 and count: print('%i times' % count) print('Doctests done') diff --git a/rsa/prime.py b/rsa/prime.py index d8c1f04..3d63542 100644 --- a/rsa/prime.py +++ b/rsa/prime.py @@ -195,7 +195,7 @@ if __name__ == '__main__': if failures: break - if count and count % 100 == 0: + if count % 100 == 0 and count: print('%i times' % count) print('Doctests done') diff --git a/rsa/randnum.py b/rsa/randnum.py index 3c788a5..310acaa 100644 --- a/rsa/randnum.py +++ b/rsa/randnum.py @@ -88,7 +88,7 @@ def randint(maxvalue): if value <= maxvalue: break - if tries and tries % 10 == 0: + if tries % 10 == 0 and tries: # After a lot of tries to get the right number of bits but still # smaller than maxvalue, decrease the number of bits by 1. That'll # dramatically increase the chances to get a large enough number. |