File: sys_path_none.patch

package info (click to toggle)
azure-devops-cli-extension 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 22,680 kB
  • sloc: python: 160,797; xml: 198; sh: 61; makefile: 56
file content (14 lines) | stat: -rw-r--r-- 651 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Author: Luca Boccassi <bluca@debian.org>
Description: do not add None to sys.path
 many libraries break, causing build/test failures
Forwarded: https://github.com/Azure/azure-devops-cli-extension/pull/1030
--- a/azure-devops/azext_devops/test/conftest.py
+++ b/azure-devops/azext_devops/test/conftest.py
@@ -9,4 +9,6 @@
 # Make sure that the extension install directory is on sys.path so that dependencies can be found.
 
 extensionPath = get_extension_path('azure-devops')
-sys.path.append(extensionPath)
+# Adding None to sys.path breaks numerous libraries, including pkg_resources
+if extensionPath is not None:
+    sys.path.append(extensionPath)