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