Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
arch-historical-archive
Commits
cdbc1dc5
Commit
cdbc1dc5
authored
Mar 30, 2019
by
Florian Pritz
Browse files
Print failed directories to stdout as described by readme
Signed-off-by:
Florian Pritz
<
bluewind@xinu.at
>
parent
a5a6785f
Changes
1
Hide whitespace changes
Inline
Side-by-side
upload_pkg_internetarchive.py
View file @
cdbc1dc5
...
...
@@ -70,6 +70,7 @@ class ArchiveUploader:
try
:
res
=
self
.
ia
.
upload
(
identifier
,
files
=
files
,
metadata
=
metadata
)
file_status
=
zip
(
files
,
res
)
print_error
=
False
for
status
in
file_status
:
f
=
status
[
0
]
code
=
status
[
1
].
status_code
...
...
@@ -78,6 +79,10 @@ class ArchiveUploader:
self
.
db
.
add_file
(
filename
)
else
:
print
(
f
"Upload failed with status code '
{
code
}
' for directory '
{
directory
}
' and file:
{
f
}
"
,
file
=
sys
.
stderr
)
print_error
=
True
if
print_error
:
print
(
directory
)
except
Exception
as
e
:
print
(
f
"
{
identifier
}
: exception raised"
,
file
=
sys
.
stderr
)
print
(
e
,
file
=
sys
.
stderr
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment