27 """ |
27 """ |
28 Public method to read a user agent file. |
28 Public method to read a user agent file. |
29 |
29 |
30 @param fileNameOrDevice name of the file to read (string) |
30 @param fileNameOrDevice name of the file to read (string) |
31 or reference to the device to read (QIODevice) |
31 or reference to the device to read (QIODevice) |
32 @return dictionary with user agent data (host as key, agent string as value) |
32 @return dictionary with user agent data (host as key, agent string as |
|
33 value) |
33 """ |
34 """ |
34 self.__agents = {} |
35 self.__agents = {} |
35 |
36 |
36 if isinstance(fileNameOrDevice, QIODevice): |
37 if isinstance(fileNameOrDevice, QIODevice): |
37 self.setDevice(fileNameOrDevice) |
38 self.setDevice(fileNameOrDevice) |