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):
|
||||
return adjustments
|
||||
f = open(ADJUSTMENTS_FILE, 'r')
|
||||
while True:
|
||||
line = f.readline()
|
||||
if line == '':
|
||||
break
|
||||
for line in iter(f.readline, ''):
|
||||
m = re.match(r'adj\s+(\S+)\s+(\S+)', line)
|
||||
if m is not None:
|
||||
adjustments[m.group(1)] = float(m.group(2))
|
||||
@ -113,10 +110,7 @@ def main(argv):
|
||||
times.append([None, None])
|
||||
|
||||
f = open(LOG_FILE, 'r')
|
||||
while True:
|
||||
line = f.readline()
|
||||
if line == '':
|
||||
break
|
||||
for line in iter(f.readline, ''):
|
||||
if (re.search(r'gnome-screensaver.*unlocked.login.keyring', line)
|
||||
or re.search(r'screen unlocked', line)):
|
||||
# found a login line
|
||||
|
Loading…
x
Reference in New Issue
Block a user