Commit e37011c9 authored by Christian Robottom's avatar Christian Robottom

Handle empty password files gracefully.

parent 8fa6beda
...@@ -83,6 +83,10 @@ class Database: ...@@ -83,6 +83,10 @@ class Database:
fd = open(filename) fd = open(filename)
L = fd.readlines() L = fd.readlines()
if not L:
return
if L[0].startswith("realm "): if L[0].startswith("realm "):
line = L.pop(0).strip() line = L.pop(0).strip()
self.realm = line[len("realm "):] self.realm = line[len("realm "):]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment