Skip to content

Commit

Permalink
v0.1.4
Browse files Browse the repository at this point in the history
- Fixed browser specific methods returning user agents of the default browser
- Fixed `get` method selecting user agents from default browser even if the browser argument is provided
  • Loading branch information
Itz-fork committed Aug 1, 2022
1 parent 83649f0 commit 4089c79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion FakeAgent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

from .agent import Fake_Agent

__version__ = "v0.1.3"
__version__ = "v0.1.4"
2 changes: 1 addition & 1 deletion FakeAgent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get(self, browser: Enum = None, as_gen: bool = False):
- `as_gen` :bool (optional) - Return value as a generator rather than a list. Defaults to `False`
"""
to_use = browser.value if browser else self.browser.value
vl = self.json_file if self.json_file else self._read_json_as_dict(
vl = self.json_file if (self.browser == browser and self.json_file) else self._read_json_as_dict(
f"{self.data_location}{to_use}.json")
if as_gen:
return (val for val in vl.values())
Expand Down

0 comments on commit 4089c79

Please sign in to comment.