File: 0002-add-system-location-for-regexes.yaml.patch

package info (click to toggle)
python-ua-parser 0.16.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 212 kB
  • sloc: python: 852; makefile: 39; sh: 7
file content (21 lines) | stat: -rw-r--r-- 745 bytes parent folder | download | duplicates (2)
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 4989336..0eb7bc0 100644
--- a/ua_parser/user_agent_parser.py
+++ b/ua_parser/user_agent_parser.py
@@ -524,7 +524,7 @@ def GetFilters(
 
 
 # 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