1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

Merge remote-tracking branch 'origin/master'

Conflicts:
	eventlooper.py
This commit is contained in:
Dino
2014-08-10 00:32:44 +02:00

View File

@@ -14,7 +14,7 @@ fifo_path = os.path.join(basedir, 'cmdfifo')
# rate limiting to 5 messages per 10 minutes
hist_max_count = 5
hist_max_time = 10 * 60
hist_max_time = 10 * 60
hist_ts = []
hist_flag = True
uptime = -time.time()
@@ -65,7 +65,7 @@ def extract_title(url):
if 'text/' != headers['content-type'][:len('text/')]:
return (1, headers['content-type'])
result = re.match(r'.*?<title.*?>(.*?)</title>.*?', html, re.S|re.M|re.IGNORECASE)
result = re.match(r'.*?<title.*?>(.*?)</title>.*?', html, re.S | re.M | re.IGNORECASE)
if result:
return (0, result.groups()[0])
else:
@@ -224,7 +224,7 @@ def parse_delete(filepath):
os.remove(filepath) # probably better crash here
def print_version_git():
import subprocess, sys
import subprocess
cmd = ['git', 'log', '-n', '1', '--oneline', '--abbrev-commit']
@@ -236,9 +236,9 @@ def print_version_git():
else:
print sys.argv[0] + " (unknown version)"
#print_version_git()
if '__main__' == __name__:
print_version_git()
if __name__ == '__main__':
while 1:
try:
for f in os.listdir(event_files_dir):