Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 35.2k
gh-131178: Fix mimetypes CLI docs to mention that errors go to stdout#149683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
c87667b77e5b2a5b75aaaad605cdf6db7b1edf95dab00896ce0409b3277b0074b28aedFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -358,7 +358,7 @@ it converts file extensions to MIME types. | ||
| For each ``type`` entry, the script writes a line into the standard output | ||
| stream. If an unknown type occurs, it writes an error message into the | ||
| standard error stream and exits with the return code ``1``. | ||
| standard output stream and exits with the return code ``1``. | ||
| .. mimetypes-cli-example: | ||
| @@ -385,7 +385,7 @@ interface: | ||
| $ # get a MIME type for a rare file extension | ||
| $ python -m mimetypes filename.pict | ||
| error: unknown extension of filename.pict | ||
| error: media type unknown for filename.pict | ||
| $ # now look in the extended database built into Python | ||
| $ python -m mimetypes --lenient filename.pict | ||
| @@ -407,7 +407,8 @@ interface: | ||
| $ python -m mimetypes filename.sh filename.nc filename.xxx filename.txt | ||
sobolevn marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| type: application/x-sh encoding: None | ||
| type: application/x-netcdf encoding: None | ||
| error: unknown extension of filename.xxx | ||
| error: media type unknown for filename.xxx | ||
htjworld marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| type: text/plain encoding: None | ||
| $ # try to feed an unknown MIME type | ||
| $ python -m mimetypes --extension audio/aac audio/opus audio/future audio/x-wav | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.