Browse files

fixed RuntimeError in caused by pandoc on non-amd64 arches (#…


If pandoc is not installed locally, pwntools'
tells pypandoc to download one.

Unfortunately, it fails on non-amd64 arches because
pypandocs provides precompiled binaries only for amd64.

Since pypandoc is not hard dependency for pwntools,
this error can be skipped without major harm.

In fact, pwntools' already handles ImportError
gracefully. The problem is, arch mismatch causes
a completely different exception.
  • Loading branch information...
1 parent 8b30700 commit b584ca349a032ab53d57de29f209bbbdfcd859ca @WGH- WGH- committed with zachriggle Dec 29, 2016
Showing with 4 additions and 0 deletions.
  1. +4 −0
@@ -3,6 +3,7 @@
import os
import platform
import sys
+import traceback
from distutils.command.install import INSTALL_SCHEMES
from distutils.sysconfig import get_python_inc
from distutils.util import convert_path
@@ -75,6 +76,9 @@
long_description = pypandoc.convert_file('', 'rst')
except ImportError:
+except Exception as e:
+ print >>sys.stderr, "Failed to convert through pandoc, proceeding anyway"
+ traceback.print_exc()

0 comments on commit b584ca3

Please sign in to comment.