Skip to content

Commit

Permalink
Merge branch 'hotfix/sandboxing'
Browse files Browse the repository at this point in the history
  • Loading branch information
fikovnik committed Mar 16, 2015
2 parents 5961b46 + f360cbe commit 2bc4f1f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions omnigraffle_export/omnigraffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,17 @@ def open(self, fname):

fname = os.path.abspath(fname)
self.og.activate()

# adhoc fix for https://github.com/fikovnik/omnigraffle-export/issues/23
# apparently the process is sandboxed and cannot access the file
# 16/03/2015 13:01:54.000 kernel[0]: Sandbox: OmniGraffle(66840) deny file-read-data test.graffle
# therefore we first try to open it manually

import subprocess
subprocess.call(['open',fname])

window = self.og.windows.first()
# doc = window.document()
doc = self.og.open(fname)

logging.debug('Opened OmniGraffle file: ' + fname)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def read(fname):

setup (
name = "omnigraffle-export",
version = "1.7",
version = "1.7.1",
packages = find_packages(exclude='tests'),
install_requires = ['appscript','pyobjc'],
author = "Filip Krikava",
Expand Down

0 comments on commit 2bc4f1f

Please sign in to comment.