Fix Python 2.5 support

And fix some PEP8 style issues (mostly about spaces) while I was there.

refs #806
This commit is contained in:
Laurent Bachelier 2012-03-12 21:37:51 +01:00 committed by Romain Bignon
commit 062f2c4c3e
10 changed files with 30 additions and 16 deletions

View file

@ -1,9 +1,12 @@
#!/usr/bin/env python
from __future__ import with_statement
import glob
import subprocess
import os
import sys
def check_executable(executable):
with open('/dev/null', 'w') as devnull:
process = subprocess.Popen(['which', executable], stdout=devnull)
@ -14,6 +17,7 @@ def check_executable(executable):
print >>sys.stderr, 'Error: %s is not installed on your system.' % executable
sys.exit(1)
def install_xdg():
print 'installing desktop menu files'
check_executable('xdg-desktop-menu')