Revision d3817d45
b/vncauthproxy/proxy.py | ||
---|---|---|
622 | 622 |
'(?P<pass>\S+)\s*$') |
623 | 623 |
|
624 | 624 |
users = {} |
625 |
|
|
626 |
if os.path.isfile(auth_file) is False: |
|
627 |
logger.warning("Authentication file not found. Continuing without" |
|
628 |
"users") |
|
629 |
return users |
|
630 |
|
|
625 | 631 |
try: |
626 | 632 |
with open(auth_file) as f: |
627 | 633 |
lines = [l.strip() for l in f.readlines()] |
... | ... | |
648 | 654 |
|
649 | 655 |
users[user] = password |
650 | 656 |
except IOError as err: |
651 |
logger.critical("Couldn't read auth file")
|
|
652 |
raise InternalError(err)
|
|
657 |
logger.error("Error while reading the auth file:")
|
|
658 |
logger.exception(err)
|
|
653 | 659 |
|
654 | 660 |
if not users: |
655 |
raise InternalError("No users defined")
|
|
661 |
logger.warning("No users defined")
|
|
656 | 662 |
|
657 | 663 |
return users |
658 | 664 |
|
Also available in: Unified diff