Consistent quotes

This commit is contained in:
enkore 2013-02-15 18:38:18 +01:00
parent 922ae49aba
commit 561e60efee
3 changed files with 22 additions and 24 deletions

View File

@ -32,7 +32,7 @@ class I3statusHandler:
def print_line(self, message):
"""Unbuffered printing to stdout."""
sys.stdout.write(message + '\n')
sys.stdout.write(message + "\n")
sys.stdout.flush()
def read_line(self):
@ -61,11 +61,11 @@ class I3statusHandler:
module.thread.start()
while True:
line, prefix = self.read_line(), ''
line, prefix = self.read_line(), ""
# ignore comma at start of lines
if line.startswith(','):
line, prefix = line[1:], ','
if line.startswith(","):
line, prefix = line[1:], ","
j = json.loads(line)

View File

@ -13,23 +13,23 @@ status = I3statusHandler()
# The imap checker module
mailsettings = {
'color': '#ff0000',
'servers': [
"color": "#ff0000",
"servers": [
{
'host': 'www.testhost1.com',
'port': '993',
'ssl' : True,
'username': 'your_username',
'password': 'your_password',
'pause': 20
"host": "www.testhost1.com",
"port": "993",
"ssl" : True,
"username": "your_username",
"password": "your_password",
"pause": 20
},
{
'host': 'www.testhost2.net',
'port': '993',
'ssl' : True,
'username': 'your_username',
'password': 'your_password',
'pause': 20
"host": "www.testhost2.net",
"port": "993",
"ssl" : True,
"username": "your_username",
"password": "your_password",
"pause": 20
}
]
}
@ -38,14 +38,14 @@ status.register_module(mailchecker)
# the mods.de forum new bookmarks module
mdesettings = {
'username': "your_username",
'password': "your_password"
"username": "your_username",
"password": "your_password"
}
mde = modsde.ModsDeChecker(mdesettings)
status.register_module(mde)
# the notmuch mail checker module
db_path = 'path_to_your_notmuch_database'
db_path = "path_to_your_notmuch_database"
notmuch = notmuchmailchecker.NotmuchMailChecker(db_path)
status.register_module(notmuch)

View File

@ -29,8 +29,6 @@ class ModsDeChecker(Module):
settings = {
"color": "#7181fe",
"pause": 20,
"username": "",
"password": "",
"offset": 0,
"format": "%d new posts in bookmarks"
}
@ -86,5 +84,5 @@ class ModsDeChecker(Module):
for cookie in self.cj:
self.cj.clear
self.logged_in = True
self.opener.addheaders.append(('Cookie', '{}={}'.format(cookie.name, cookie.value)))
self.opener.addheaders.append(("Cookie", "{}={}".format(cookie.name, cookie.value)))
return True