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:
parent
db85b651d4
commit
062f2c4c3e
10 changed files with 30 additions and 16 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue