# HG changeset patch # User k0s # Date 1258851130 18000 # Node ID 01015b36290a2feebe83e820dbd1ad4fbaa4fc4f # Parent c5f19f51e1e887b658dfee1f0d3a5c64df760cb9 look for home configuration file if it exists diff -r c5f19f51e1e8 -r 01015b36290a setup.py --- a/setup.py Sat Nov 21 17:50:38 2009 -0500 +++ b/setup.py Sat Nov 21 19:52:10 2009 -0500 @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import sys, os -version = '0.1' +version = '0.1.1' setup(name='smartopen', version=version, diff -r c5f19f51e1e8 -r 01015b36290a smartopen/smartopen.py --- a/smartopen/smartopen.py Sat Nov 21 17:50:38 2009 -0500 +++ b/smartopen/smartopen.py Sat Nov 21 19:52:10 2009 -0500 @@ -89,7 +89,9 @@ # config config = ConfigParser() - if options.config and os.path.exists(options.config): + if not options.config: + options.config = os.path.join(os.environ.get('HOME', ''), '.smartopen.ini') + if os.path.exists(options.config): config.read(options.config) if not options.handlers and config.has_option('DEFAULTS', 'handlers'): options.handlers = [ i.strip() for i in config.get('DEFAULTS', 'handlers').split(',') ]