Merge branch 'master' of ssh://holtrop.homelinux.com/files
This commit is contained in:
commit
3c8c7f2eec
10
hours
10
hours
@ -45,10 +45,7 @@ def get_adjustments():
|
|||||||
if not os.path.isfile(ADJUSTMENTS_FILE):
|
if not os.path.isfile(ADJUSTMENTS_FILE):
|
||||||
return adjustments
|
return adjustments
|
||||||
f = open(ADJUSTMENTS_FILE, 'r')
|
f = open(ADJUSTMENTS_FILE, 'r')
|
||||||
while True:
|
for line in iter(f.readline, ''):
|
||||||
line = f.readline()
|
|
||||||
if line == '':
|
|
||||||
break
|
|
||||||
m = re.match(r'adj\s+(\S+)\s+(\S+)', line)
|
m = re.match(r'adj\s+(\S+)\s+(\S+)', line)
|
||||||
if m is not None:
|
if m is not None:
|
||||||
adjustments[m.group(1)] = float(m.group(2))
|
adjustments[m.group(1)] = float(m.group(2))
|
||||||
@ -113,10 +110,7 @@ def main(argv):
|
|||||||
times.append([None, None])
|
times.append([None, None])
|
||||||
|
|
||||||
f = open(LOG_FILE, 'r')
|
f = open(LOG_FILE, 'r')
|
||||||
while True:
|
for line in iter(f.readline, ''):
|
||||||
line = f.readline()
|
|
||||||
if line == '':
|
|
||||||
break
|
|
||||||
if (re.search(r'gnome-screensaver.*unlocked.login.keyring', line)
|
if (re.search(r'gnome-screensaver.*unlocked.login.keyring', line)
|
||||||
or re.search(r'screen unlocked', line)):
|
or re.search(r'screen unlocked', line)):
|
||||||
# found a login line
|
# found a login line
|
||||||
|
Loading…
x
Reference in New Issue
Block a user