• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

chrismattmann / tika-python / 117
47%

Build:
DEFAULT BRANCH: master
Ran 24 Oct 2017 08:42PM UTC
Jobs 4
Files 11
Run time 11min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
117

push

travis-ci

web-flow
Provide Parse Status in returned dictionary

Small patch contributed by Gregg Morris <gregg.morris@gmail.com> to provide parse status in the returned dict from _parse method.

```
Hi Chris--

For my purposes it's very helpful to know why a call to (in my case) parser.from_buffer() returns an empty dictionary. The status code returned by the tika server is a fine solution to that. The status code from the server is passed to the _parse() function, so I added "status" to the "parsed" dictionary and put the code there, regardless of anything else returned in that dictionary.
This may certainly fall into the category of "nobody else cares", but in case you think it's worthwhile, here's the patch:

diff --git a/tika/parser.py b/tika/parser.py
index 2cc2e07..84b4c88 100644
--- a/tika/parser.py
+++ b/tika/parser.py
@@ -42,7 +42,8 @@ def _parse(jsonOutput):
     parsed={}
     if not jsonOutput:
         return parsed
-    elif jsonOutput[1] == None or jsonOutput[1] == "":
+    parsed["status"] = jsonOutput[0]
+    if jsonOutput[1] == None or jsonOutput[1] == "":
         return parsed
     realJson = json.loads(jsonOutput[1])

Thanks for your tika efforts!
Gregg
```

212 of 527 relevant lines covered (40.23%)

1.58 hits per line

Jobs
ID Job ID Ran Files Coverage
2 117.2 24 Oct 2017 08:42PM UTC 0
38.9
Travis Job 117.2
3 117.3 24 Oct 2017 08:42PM UTC 0
39.85
Travis Job 117.3
4 117.4 24 Oct 2017 08:43PM UTC 0
39.85
Travis Job 117.4
5 117.5 24 Oct 2017 08:42PM UTC 0
39.85
Travis Job 117.5
Source Files on build 117
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #117
  • fcc0c7ef on github
  • Prev Build on master (#116)
  • Next Build on master (#119)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc