diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-05-02 19:27:06 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-05-31 11:54:09 +0100 |
commit | 0143e613578b90d0e320fe4bab748b7a8726fa13 (patch) | |
tree | 6dc08a15c088f9c88fb6a55874680931380cd08c | |
parent | 835d5026fd4c39a5012d1a0d64c85a2481a2c686 (diff) |
Move a $debug check into printdebug (nfc)
-rw-r--r-- | Debian/Dgit.pm | 2 | ||||
-rwxr-xr-x | dgit | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 2b9479d..641a917 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -92,7 +92,7 @@ sub enabledebug () { } sub printdebug { - print ::DEBUG $debugprefix, @_ or die $!; + print ::DEBUG $debugprefix, @_ or die $! if $debug>0; } sub shellquote { @@ -410,7 +410,7 @@ sub cmdoutput_errok { $!=0; $?=0; { local $/ = undef; $d = <P>; } die $! if P->error; - if (!close P) { printdebug "=>!$?\n" if $debug>0; return undef; } + if (!close P) { printdebug "=>!$?\n"; return undef; } chomp $d; $d =~ m/^.*/; printdebug "=> \`$&'",(length $' ? '...' : ''),"\n" if $debug>0; #'; |