File: no-network.patch

package info (click to toggle)
libhttp-proxy-perl 0.304-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 720 kB
  • sloc: perl: 2,576; makefile: 4
file content (17 lines) | stat: -rw-r--r-- 468 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: don't try to connect to network when NO_NETWORK is set
Origin: vendor
Bug-Debian: https://bugs.debian.org/830354
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2016-07-16

--- a/t/Utils.pm
+++ b/t/Utils.pm
@@ -80,6 +80,7 @@
 
 # check that the web connection is working
 sub web_ok {
+    return 0 if $ENV{NO_NETWORK};
     my $ua = LWP::UserAgent->new( env_proxy => 1, timeout => 30 );
     my $res =
       $ua->request(