comparison makeitso/makeitso.py @ 6:ac78e26cd568

starting on web example; i have to understand more about shebangs
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 10 Nov 2010 18:11:11 -0800
parents f064be514e53
children a77630b2b491
comparison
equal deleted inserted replaced
5:f064be514e53 6:ac78e26cd568
11 from optparse import OptionParser 11 from optparse import OptionParser
12 from tempita import Template 12 from tempita import Template
13 13
14 shebang_re = '#!.*makeitso.*' 14 shebang_re = '#!.*makeitso.*'
15 shebang_re = re.compile(shebang_re) 15 shebang_re = re.compile(shebang_re)
16
17 class MissingVariablesException(Exception):
18 def __init__(self, message, missing):
19 self.missing = missing
16 20
17 def call(command, *args, **kw): 21 def call(command, *args, **kw):
18 code = subprocess.call(command, *args, **kw) 22 code = subprocess.call(command, *args, **kw)
19 if code: 23 if code:
20 if isinstance(command, basestring): 24 if isinstance(command, basestring):