Merge branch 'master' of github.com:enkore/i3pystatus
Conflicts: statushandler.py
This commit is contained in:
commit
80d7184e14
@ -8,7 +8,7 @@ import re
|
|||||||
import http.cookiejar
|
import http.cookiejar
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
class ModsDeChecker:
|
class ModsDeChecker(object):
|
||||||
"""
|
"""
|
||||||
This class returns i3status parsable output of the number of
|
This class returns i3status parsable output of the number of
|
||||||
unread posts in any bookmark in the mods.de forums.
|
unread posts in any bookmark in the mods.de forums.
|
||||||
|
@ -4,7 +4,7 @@ import sys
|
|||||||
import json
|
import json
|
||||||
import urllib.request, urllib.error, urllib.parse
|
import urllib.request, urllib.error, urllib.parse
|
||||||
|
|
||||||
class I3statusHandler:
|
class I3statusHandler(object):
|
||||||
modules = []
|
modules = []
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -66,7 +66,7 @@ class I3statusHandler:
|
|||||||
|
|
||||||
def has_internet_connection():
|
def has_internet_connection():
|
||||||
try:
|
try:
|
||||||
response=urllib.request.urlopen('http://74.125.113.99',timeout=1)
|
response=urllib2.urlopen('http://173.194.69.94',timeout=1)
|
||||||
return True
|
return True
|
||||||
except urllib.error.URLError as err: pass
|
except urllib2.URLError as err: pass
|
||||||
return False
|
return False
|
Loading…
Reference in New Issue
Block a user