git://git.camperquake.de
/
videosite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5390845
)
- Print an error code if FileGetter fails to get a file
author
Ralf Ertzinger
<sun@ryoko.camperquake.de>
Sat, 5 Jan 2008 23:26:16 +0000
(
00:26
+0100)
committer
Ralf Ertzinger
<sun@ryoko.camperquake.de>
Sat, 5 Jan 2008 23:26:16 +0000
(
00:26
+0100)
videosite/FileGetter.pm
patch
|
blob
|
history
diff --git
a/videosite/FileGetter.pm
b/videosite/FileGetter.pm
index
8c3420d
..
b3c2660
100644
(file)
--- a/
videosite/FileGetter.pm
+++ b/
videosite/FileGetter.pm
@@
-31,6
+31,7
@@
sub get {
my $video = shift;
my $dlfile;
my $dirname;
my $video = shift;
my $dlfile;
my $dirname;
+ my $res;
$dlfile = sprintf($self->_getval('FILEPATTERN'),
$self->_encode($video->{'SOURCE'}),
$dlfile = sprintf($self->_getval('FILEPATTERN'),
$self->_encode($video->{'SOURCE'}),
@@
-47,8
+48,8
@@
sub get {
$self->debug('Going to download %s to %s', $video->{'DLURL'}, $dlfile);
$self->debug('Going to download %s to %s', $video->{'DLURL'}, $dlfile);
- if (200 !=
LWP::Simple::mirror($video->{'DLURL'}, $dlfile
)) {
- $self->error('Could not download %s to %s
', $video->{'DLURL'}, $dlfile
);
+ if (200 !=
($res = LWP::Simple::mirror($video->{'DLURL'}, $dlfile)
)) {
+ $self->error('Could not download %s to %s
(%s)', $video->{'DLURL'}, $dlfile, $res
);
return 0;
}
return 0;
}