Skip to content

Commit 10015a7

Browse files
authored
Merge pull request #144 from zdohnal/master
Fallback to username/password auth in jobviewer
2 parents 6f76df3 + 43b4c84 commit 10015a7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

jobviewer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,12 @@ def get_authentication (self, job, device_uri, printer_uri,
11121112

11131113
def display_auth_info_dialog (self, job, keyring_attrs=None):
11141114
data = self.jobs[job]
1115-
auth_info_required = data['auth-info-required']
1115+
try:
1116+
auth_info_required = data['auth-info-required']
1117+
except KeyError:
1118+
debugprint ("No auth-info-required attribute; "
1119+
"guessing instead")
1120+
auth_info_required = ['username', 'password']
11161121
dialog = authconn.AuthDialog (auth_info_required=auth_info_required,
11171122
allow_remember=USE_SECRET)
11181123
dialog.keyring_attrs = keyring_attrs

0 commit comments

Comments
 (0)