Skip to content

Commit 5753f33

Browse files
committed
Move imports to top of file out of test code path.
See if this helps with time regression under python2.
1 parent 94b45fd commit 5753f33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roundup/password.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@
1919
"""
2020
__docformat__ = 'restructuredtext'
2121

22+
import os
2223
import re
2324
import string
25+
import sys
2426
import warnings
2527

2628
from base64 import b64encode, b64decode
@@ -192,8 +194,6 @@ def encodePassword(plaintext, scheme, other=None, config=None):
192194
if config:
193195
rounds = config.PASSWORD_PBKDF2_DEFAULT_ROUNDS
194196
else:
195-
import os
196-
import sys
197197
if ("pytest" in sys.modules and
198198
"PYTEST_CURRENT_TEST" in os.environ):
199199
# Set rounds to 1000 if no config is passed and

0 commit comments

Comments
 (0)