125 @return key string (string) |
125 @return key string (string) |
126 """ |
126 """ |
127 authority = url.authority() |
127 authority = url.authority() |
128 if authority.startswith("@"): |
128 if authority.startswith("@"): |
129 authority = authority[1:] |
129 authority = authority[1:] |
130 if realm: |
130 key = ( |
131 key = "{0}://{1} ({2})".format( |
131 "{0}://{1} ({2})".format(url.scheme(), authority, realm) |
132 url.scheme(), authority, realm) |
132 if realm else |
133 else: |
133 "{0}://{1}".format(url.scheme(), authority) |
134 key = "{0}://{1}".format(url.scheme(), authority) |
134 ) |
135 return key |
135 return key |
136 |
136 |
137 def getFileName(self): |
137 def getFileName(self): |
138 """ |
138 """ |
139 Public method to get the file name of the passwords file. |
139 Public method to get the file name of the passwords file. |