~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to scripts/interpretservice

  • Committer: wagrant
  • Date: 2008-08-08 02:39:00 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:993
interpretservice: Don't die horribly if we can't chdir into the path's parent.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
python = "/usr/bin/python"
50
50
 
51
51
# Everything should be done from the same directory as the script
52
 
os.chdir(path)
 
52
# If we can't chdir, a 404 will be thrown later when we can't access the file.
 
53
try:
 
54
    os.chdir(path)
 
55
except OSError:
 
56
    pass
 
57
 
53
58
# Search the path for modules first
54
59
sys.path[0] = path
55
60