Skip to content

Commit

Permalink
Remove python2 support in imports
Browse files Browse the repository at this point in the history
We don't use python2 anywhere anymore, and these imports are tough to
analize for LSP (694396e)
  • Loading branch information
singiamtel committed Sep 23, 2024
1 parent f50f77d commit 8d6c755
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
8 changes: 2 additions & 6 deletions analytics/report-analytics
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ import argparse
import os
import subprocess
import sys
try:
from commands import getstatusoutput
from urllib import urlopen
except ImportError:
from subprocess import getstatusoutput
from urllib.request import urlopen
from subprocess import getstatusoutput
from urllib.request import urlopen


def python_version():
Expand Down
5 changes: 1 addition & 4 deletions ci/sync-mapusers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
from requests import get
from random import choice
import yaml,sys
try:
from urlparse import urlsplit,urlunsplit
except ImportError:
from urllib.parse import urlsplit,urlunsplit
from urllib.parse import urlsplit,urlunsplit

url = sys.argv[1]
mesos_dns = "leader.mesos:8123"
Expand Down
5 changes: 1 addition & 4 deletions report-pr-errors
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
from __future__ import print_function

from argparse import ArgumentParser, Namespace
try:
from commands import getstatusoutput
except ImportError:
from subprocess import getstatusoutput
from subprocess import getstatusoutput
from collections import deque
from fnmatch import fnmatch
from glob import glob
Expand Down

0 comments on commit 8d6c755

Please sign in to comment.