diff --git a/patoolib/util.py b/patoolib/util.py
index <HASH>..<HASH> 100644
--- a/patoolib/util.py
+++ b/patoolib/util.py
@@ -54,11 +54,14 @@ def guess_mime (filename):
     and then file(1) as fallback."""
     mime, encoding = mimedb.guess_type(filename, strict=False)
     if mime is None and os.path.isfile(filename):
-        cmd = ["file", "--brief", "--mime-type", filename]
-        try:
-            mime = backtick(cmd).strip()
-        except OSError, msg:
-            pass
+        file_prog = find_program("file")
+        if file_prog:
+            cmd = [file_prog, "--brief", "--mime-type", filename]
+            try:
+                mime = backtick(cmd).strip()
+            except OSError, msg:
+                # ignore errors, as file(1) is only a fallback
+                pass
     return mime, encoding
Only call file(1) program if it is available.