Mercurial > hg > MakeItSo
comparison makeitso/cli.py @ 121:d28cde6c942e
do not use undefined defaults
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Wed, 19 Jan 2011 18:18:47 -0800 |
| parents | 9c70669854f4 |
| children | b2152efec89a |
comparison
equal
deleted
inserted
replaced
| 120:9c70669854f4 | 121:d28cde6c942e |
|---|---|
| 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('_') and value is not Undefined]) | 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: |
