Skip to content

Commit 83e3d8c

Browse files
committed
move conditional import later
1 parent 0962c94 commit 83e3d8c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

readthedocs/projects/models.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@
22

33
import fnmatch
44
import logging
5-
import os
6-
75
import sys
8-
9-
if sys.version_info > (3,):
10-
from urllib.parse import urlparse
11-
else:
12-
from urlparse import urlparse
6+
import os
137

148
from django.conf import settings
159
from django.contrib.auth.models import User
@@ -42,6 +36,12 @@
4236
from readthedocs.vcs_support.backends import backend_cls
4337
from readthedocs.vcs_support.utils import Lock, NonBlockingLock
4438

39+
if sys.version_info > (3,):
40+
from urllib.parse import urlparse
41+
else:
42+
from urlparse import urlparse
43+
44+
4545

4646
log = logging.getLogger(__name__)
4747

0 commit comments

Comments
 (0)