Skip to content
Snippets Groups Projects
Commit 131637a3 authored by Adar Nimrod's avatar Adar Nimrod Committed by nimrod
Browse files

Retain some support for Python2.

Allow for running under Python 2.6 or 2.7. The invocation needs to be
`python update_repos`.
parent abf2870b
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3 #!/usr/bin/env python3
# encoding: utf-8 # encoding: utf-8
from __future__ import (print_function, unicode_literals)
import base64 import base64
import sys import sys
import os import os
import argparse import argparse
from collections import namedtuple from collections import namedtuple
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
import json
from urllib.parse import urlencode try:
from urllib.parse import urlencode, urlparse
from urllib.request import Request, urlopen from urllib.request import Request, urlopen
import json except ImportError:
from urllib.parse import urlparse from urllib import urlencode
from urllib2 import Request, urlopen
from urlparse import urlparse
WHITELIST=[] WHITELIST=[]
BLACKLIST=[] BLACKLIST=[]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment