Mercurial > hg > MakeItSo
comparison makeitso/cli.py @ 120:9c70669854f4
fix an error on CLI finding Undefined variables
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 25 Jan 2011 16:18:10 -0800 |
parents | 37f92ae8f999 |
children | d28cde6c942e |
comparison
equal
deleted
inserted
replaced
119:c8d3b2edf242 | 120:9c70669854f4 |
---|---|
33 """ | 33 """ |
34 return variables from (parsed) options | 34 return variables from (parsed) options |
35 """ | 35 """ |
36 return dict([(key, value) | 36 return dict([(key, value) |
37 for key, value in options.__dict__.items() | 37 for key, value in options.__dict__.items() |
38 if not key.startswith('_')]) | 38 if not key.startswith('_') and value is not Undefined]) |
39 | 39 |
40 def parse(self, args=None, parser=None, options=None): | 40 def parse(self, args=None, parser=None, options=None): |
41 | 41 |
42 # parse the command line | 42 # parse the command line |
43 if not parser or not options: | 43 if not parser or not options: |