Package: python-ua-parser / 0.8.0-1

0002-add-system-location-for-regexes.yaml.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Edward Betts <edward@4angle.com>
Date: Wed, 14 Feb 2018 08:00:00 +0000
Subject: Add system location of regexes.yaml

---
 ua_parser/user_agent_parser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ua_parser/user_agent_parser.py b/ua_parser/user_agent_parser.py
index 987e445..710ff73 100644
--- a/ua_parser/user_agent_parser.py
+++ b/ua_parser/user_agent_parser.py
@@ -447,7 +447,7 @@ def GetFilters(user_agent_string, js_user_agent_string=None,
 
 
 # Build the list of user agent parsers from YAML
-UA_PARSER_YAML = os.environ.get("UA_PARSER_YAML")
+UA_PARSER_YAML = os.environ.get("UA_PARSER_YAML", "/usr/share/uap-core/regexes.yaml")
 if UA_PARSER_YAML:
     # This will raise an ImportError if missing, obviously since it's no
     # longer a requirement