Comments (3)
You should be able to intercept the warning message and turn it into an exception by modifying the libarchive.ffi.logger
object. The simplest way to do that is probably to replace the logger's warning
method. A cleaner solution could be to create a special Handler
and call logger.addHandler(handler)
.
from python-libarchive-c.
Thanks, that got me going in the right direction.
from python-libarchive-c.
Let's keep this issue open as a feature request. We could add a function named check_archive
or is_valid_archive
.
from python-libarchive-c.
Related Issues (20)
- Extract to specific folder HOT 2
- Minor test issues under pypy
- Attempting to use ArchiveEntry outside of for loop doesn't work
- read_next_header2() takes long time for closing archive in solid 7z archive when last file is big HOT 1
- Type checking
- Obtaining the position (byte offset) of an entry within the archive HOT 1
- `AttributeError` when using a libarchive version which doesn't support passphrases
- Cannot set uid/gid when adding file from memory
- hold strong reference of callback HOT 1
- Suggestion: Test file HOT 1
- AttributeError: 'ArchiveEntry' object has no attribute '_pointer' when getting the entry format_name
- Tests with unicode path entires are failing HOT 2
- Ability to decrypt zip and 7z files HOT 3
- Extract empty files? HOT 2
- SECURE_NODOTDOT not having effect? HOT 1
- Writing 7zip file HOT 1
- Modifying the path of an entry before adding it to an archive HOT 1
- Inconsistent behavior for encrypted rar/zip/7z HOT 1
- Installing python-libarchive using pip via wheel HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-libarchive-c.