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 xml.etree.ElementTree as ET
|
||||
|
||||
class ModsDeChecker:
|
||||
class ModsDeChecker(object):
|
||||
"""
|
||||
This class returns i3status parsable output of the number of
|
||||
unread posts in any bookmark in the mods.de forums.
|
||||
@ -95,4 +95,4 @@ class ModsDeChecker:
|
||||
return {'full_text' : '%d new posts in bookmarks' % unread,
|
||||
'name' : 'modsde',
|
||||
'urgent' : 'true',
|
||||
'color' : self.settings['color']}
|
||||
'color' : self.settings['color']}
|
||||
|
@ -4,7 +4,7 @@ import sys
|
||||
import json
|
||||
import urllib.request, urllib.error, urllib.parse
|
||||
|
||||
class I3statusHandler:
|
||||
class I3statusHandler(object):
|
||||
modules = []
|
||||
|
||||
def __init__(self):
|
||||
@ -66,7 +66,7 @@ class I3statusHandler:
|
||||
|
||||
def has_internet_connection():
|
||||
try:
|
||||
response=urllib.request.urlopen('http://74.125.113.99',timeout=1)
|
||||
response=urllib2.urlopen('http://173.194.69.94',timeout=1)
|
||||
return True
|
||||
except urllib.error.URLError as err: pass
|
||||
return False
|
||||
except urllib2.URLError as err: pass
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user