Mercurial > ~darius > hgwebdir.cgi > adslstats
comparison adslstats.py @ 33:7d8bee5e3c80
Retain backwards compatibility with 2.7
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Sat, 14 Nov 2020 14:56:05 +1030 |
parents | 1af6865189ce |
children | b79c03810bbe |
comparison
equal
deleted
inserted
replaced
32:1af6865189ce | 33:7d8bee5e3c80 |
---|---|
31 ############################################################################ | 31 ############################################################################ |
32 | 32 |
33 import base64 | 33 import base64 |
34 import binascii | 34 import binascii |
35 import bs4 | 35 import bs4 |
36 import configparser | 36 try: |
37 import configparser | |
38 except ImportError: | |
39 import ConfigParser as configparser | |
37 import json | 40 import json |
38 import mechanize | 41 import mechanize |
39 import mysrp as srp | 42 import mysrp as srp |
40 import argparse | 43 import argparse |
41 import os | 44 import os |
43 import re | 46 import re |
44 import requests | 47 import requests |
45 import rrdtool | 48 import rrdtool |
46 import sys | 49 import sys |
47 import time | 50 import time |
48 import urllib.request, urllib.parse, urllib.error | 51 import urllib |
49 from functools import reduce | 52 from functools import reduce |
50 | 53 |
51 conf = configparser.ConfigParser() | 54 conf = configparser.ConfigParser() |
52 conf.add_section('global') | 55 conf.add_section('global') |
53 | 56 |