src/eric7/WebBrowser/UserAgent/UserAgentReader.py

branch
eric7
changeset 10436
f6881d10e995
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10435:c712d09cc839 10436:f6881d10e995
24 24
25 def read(self, fileNameOrDevice): 25 def read(self, fileNameOrDevice):
26 """ 26 """
27 Public method to read a user agent file. 27 Public method to read a user agent file.
28 28
29 @param fileNameOrDevice name of the file to read (string) 29 @param fileNameOrDevice name of the file to read or reference to the device
30 or reference to the device to read (QIODevice) 30 to read
31 @return dictionary with user agent data (host as key, agent string as 31 @type str or QIODevice
32 value) 32 @return dictionary with user agent data (host as key, agent string as value)
33 @rtype dict
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)

eric ide

mercurial