Skip to content
Browse files

detect mac osx proper and print some more info on failure

  • Loading branch information...
1 parent 0cdba80 commit d822278b02f0e8c8cdd2d61d82c1d6bc16826668 @troelskn committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 unoconv
View
4 unoconv
@@ -54,7 +54,7 @@ def find_offices():
if 'ProgramFiles(x86)' in os.environ.keys():
extrapaths += glob.glob(os.environ['ProgramFiles(x86)']+'\\LibreOffice.org*') + \
glob.glob(os.environ['ProgramFiles(x86)']+'\\OpenOffice.org*')
- elif os.name in ( 'mac' ):
+ elif os.name == 'mac' or sys.platform == 'darwin':
extrapaths += glob.glob('/Applications/LibreOffice.app/Contents') + \
glob.glob('/Applications/NeoOffice.app/Contents') + \
glob.glob('/Applications/OpenOffice.org.app/Contents')
@@ -870,6 +870,7 @@ if __name__ == '__main__':
else:
print >>sys.stderr, "unoconv: Cannot find a suitable pyuno library and python binary combination on your system."
print >>sys.stderr, "ERROR: Please locate this library and send your feedback to: <tools@lists.repoforge.org>."
+ print >>sys.stderr, sys.exc_info()[1]
sys.exit(1)
try:
@@ -883,6 +884,7 @@ if __name__ == '__main__':
except:
print >>sys.stderr, "unoconv: Cannot find a suitable pyuno library and python binary combination on your system."
print >>sys.stderr, "ERROR: Please locate this library and send your feedback to: <tools@lists.rpmforge.net>."
+ print >>sys.stderr, sys.exc_info()[1]
sys.exit(1)
### Now that we have found a working pyuno library, let's import some classes

0 comments on commit d822278

Please sign in to comment.
Something went wrong with that request. Please try again.