Mercurial > hg > stampit
changeset 11:7e538a4b0e79
make directories work like they should
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 23 Apr 2010 09:48:16 -0700 |
parents | f63e51490c61 |
children | fa758b655dcc |
files | stampit/main.py |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/stampit/main.py Fri Apr 23 09:17:51 2010 -0700 +++ b/stampit/main.py Fri Apr 23 09:48:16 2010 -0700 @@ -64,9 +64,14 @@ for option in 'virtualenv', 'output', 'directory': # expand ~ arguments path = getattr(options, option) - if path is not None and '~' in path: - setattr(options, option, os.path.expanduser(path)) - callargs = options.verbose and {} or { 'stdout': subprocess.PIPE } + if path is not None: + if '~' in path: + path = os.path.expanduser(path) + setattr(options, option, os.path.abspath(path)) + + callargs = {} + if not options.verbose: # suppress output + callargs = {'stdout': subprocess.PIPE} if options.quiet: callargs['stderr'] = subprocess.PIPE if not args: