[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST 6/6] Serial/http: use mkdtemp instead of File::Temp->newdir
The latter is not available in Squeeze's File::Temp. --- Osstest/Serial/http.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Osstest/Serial/http.pm b/Osstest/Serial/http.pm index cb36f1c..3094baa 100644 --- a/Osstest/Serial/http.pm +++ b/Osstest/Serial/http.pm @@ -24,7 +24,8 @@ use warnings; use Osstest; use Osstest::TestSupport; -use File::Temp; +use File::Path qw / rmtree /; +use File::Temp qw / mkdtemp /; use File::Copy; BEGIN { @@ -64,8 +65,7 @@ sub fetch_logs { logm("serial http from $mo->{Name} fetching $mo->{Pattern} from $mo->{Server}"); - my $dir = File::Temp->newdir(); - my $tdir = $dir->dirname; + my $tdir = mkdtemp("osstest.log.XXXXX") or die $!; my $lrf = "$tdir/log-retrieval.log"; @@ -93,7 +93,7 @@ sub fetch_logs { $df =~ s,.*/,,; if ($lfage < $started) { next if $done{$inum}; - logm("$df modified $lfage, skipping") + logm("$df modified $lfage ($started), skipping") unless $done{$inum}; $done{$inum}= 1; next; @@ -107,8 +107,9 @@ sub fetch_logs { my $dh= open_unique_stashfile(\$df); File::Copy::copy($logfile, $dh); } - return; + rmtree($tdir); + return; } 1; -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |